Skip to content

Commit

Permalink
update table style
Browse files Browse the repository at this point in the history
  • Loading branch information
glassonion1 committed Dec 29, 2023
1 parent b1fb402 commit 78d7f82
Show file tree
Hide file tree
Showing 5 changed files with 210 additions and 9 deletions.
4 changes: 2 additions & 2 deletions examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
},
"dependencies": {
"@sakura-ui/config": "^0.1.8",
"@sakura-ui/core": "^0.1.27",
"@sakura-ui/forms": "^0.1.8",
"@sakura-ui/core": "^0.1.28",
"@sakura-ui/forms": "^0.1.9",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.21.0"
Expand Down
26 changes: 23 additions & 3 deletions examples/src/pages/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,14 @@ import {
CardFooter,
Faq,
Question,
Answer
Answer,
Table,
Tbody,
Tr,
Th,
Td
} from '@sakura-ui/core'
//from '../../packages/core/src'
//from '../../../packages/core/src'
import {
Checkbox,
CheckboxGroup,
Expand All @@ -33,7 +38,7 @@ import {
FieldsetControl,
LabelControl
} from '@sakura-ui/forms'
//from '../../packages/forms/src'
//from '../../../packages/forms/src'

const Home = () => {
const [count, setCount] = useState<number>(0)
Expand Down Expand Up @@ -73,6 +78,21 @@ const Home = () => {
</li>
</Ul>
</div>
<div className="w-1/2 my-4">
<H2>Table</H2>
<Table>
<Tbody>
<Tr>
<Th scope="row">key1</Th>
<Td className="p-2">value1</Td>
</Tr>
<Tr>
<Th scope="row">key2</Th>
<Td>value2</Td>
</Tr>
</Tbody>
</Table>
</div>
<div className="w-1/3 my-4">
<H2>Card</H2>
<Card>
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sakura-ui/core",
"version": "0.1.27",
"version": "0.1.28",
"type": "module",
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts",
Expand Down
5 changes: 3 additions & 2 deletions packages/core/src/components/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface TableProps extends React.ComponentPropsWithoutRef<'table'> {}
const styleBorder = `
border
border-collapse
border-sumi-900
border-[#cccccc]
`

export const Table = (props: TableProps) => {
Expand Down Expand Up @@ -71,7 +71,8 @@ export const Th = (props: ThProps) => {

const style = `
p-2
bg-sumi-100
bg-[#f8f8fb]
text-base
text-left
`
return (
Expand Down
182 changes: 181 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 78d7f82

Please sign in to comment.