Skip to content

Commit

Permalink
add highlight to button.
Browse files Browse the repository at this point in the history
  • Loading branch information
glassonion1 committed Sep 14, 2023
1 parent 7a73e5a commit c6dae7d
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 149 deletions.
2 changes: 1 addition & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"dependencies": {
"@sakura-ui/config": "^0.1.4",
"@sakura-ui/core": "^0.1.11",
"@sakura-ui/core": "^0.1.12",
"@sakura-ui/forms": "^0.1.4",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down
12 changes: 7 additions & 5 deletions examples/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ import {
Card,
CardHeader,
CardBody,
CardFooter //from '@sakura-ui/core'
} from '../../packages/core/src'
CardFooter
} from '@sakura-ui/core'
//from '../../packages/core/src'
import {
Checkbox,
CheckboxGroup,
Expand All @@ -26,8 +27,9 @@ import {
Input,
Textarea,
FieldsetControl,
LabelControl //from '@sakura-ui/forms'
} from '../../packages/forms/src'
LabelControl
} from '@sakura-ui/forms'
//from '../../packages/forms/src'

const App = () => {
const [count, setCount] = useState<number>(0)
Expand Down Expand Up @@ -335,7 +337,7 @@ const App = () => {
<Textarea rows={4} />
</LabelControl>
<LabelControl labelText="Textarea with maxLength">
<Textarea rows={4} maxLength="50" />
<Textarea rows={4} maxLength={50} />
</LabelControl>
</div>
<div className="flex space-x-4">
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.11",
"version": "0.1.12",
"type": "module",
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts",
Expand Down
14 changes: 7 additions & 7 deletions packages/core/src/components/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ export const Button: React.ElementType<ButtonProps> = React.forwardRef<
border
border-solid
border-sea-800
active:enabled:border-sea-800-darken
hover:enabled:border-sea-800-darken
active:enabled:border-sea-800/[.8]
hover:enabled:border-sea-800/[.85]
focus:outline
focus:outline-2
focus:outline-wood-600
Expand All @@ -38,18 +38,18 @@ export const Button: React.ElementType<ButtonProps> = React.forwardRef<
const primary = `
text-white-1000
bg-sea-800
active:enabled:bg-sea-800-darken
hover:enabled:bg-sea-800-darken
active:enabled:bg-sea-800/[.8]
hover:enabled:bg-sea-800/[.85]
disabled:bg-sumi-500
disabled:text-white-1000
`
const secondary = `
text-sea-800
bg-transparent
active:enabled:bg-sea-50
active:enabled:bg-sea-50/[.60]
hover:enabled:bg-sea-50
active:enabled:text-sea-800-darken
hover:enabled:text-sea-800-darken
active:enabled:text-sea-800/[.85]
hover:enabled:text-sea-800/[.85]
disabled:text-sumi-500
`

Expand Down
14 changes: 7 additions & 7 deletions packages/core/src/components/IconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ export const IconButton: React.ElementType<IconButtonProps> = React.forwardRef<
border
border-solid
border-sea-800
active:enabled:border-sea-800-darken
hover:enabled:border-sea-800-darken
active:enabled:border-sea-800/[.8]
hover:enabled:border-sea-800/[.85]
focus:outline
focus:outline-2
focus:outline-wood-600
Expand All @@ -50,18 +50,18 @@ export const IconButton: React.ElementType<IconButtonProps> = React.forwardRef<
const primary = `
text-white-1000
bg-sea-800
active:enabled:bg-sea-800-darken
hover:enabled:bg-sea-800-darken
active:enabled:bg-sea-800/[.8]
hover:enabled:bg-sea-800/[.85]
disabled:bg-sumi-500
disabled:text-white-1000
`
const secondary = `
text-sea-800
bg-transparent
active:enabled:bg-sea-50
active:enabled:bg-sea-50/[.60]
hover:enabled:bg-sea-50
active:enabled:text-sea-800-darken
hover:enabled:text-sea-800-darken
active:enabled:text-sea-800/[.85]
hover:enabled:text-sea-800/[.85]
disabled:text-sumi-500
`

Expand Down
129 changes: 1 addition & 128 deletions pnpm-lock.yaml

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

0 comments on commit c6dae7d

Please sign in to comment.