diff --git a/.changeset/button-changes.md b/.changeset/button-changes.md index 06c7c06b90b..990cfe11512 100644 --- a/.changeset/button-changes.md +++ b/.changeset/button-changes.md @@ -2,25 +2,15 @@ "@salt-ds/core": minor --- -Added `color` and `appearance` prop for Button. +Added `color` and `appearance` props for Button. These props replace the `variant` prop. ```tsx - - - - - - + + + + +); diff --git a/site/src/examples/button/Color.tsx b/site/src/examples/button/Color.tsx new file mode 100644 index 00000000000..a9f0e970c92 --- /dev/null +++ b/site/src/examples/button/Color.tsx @@ -0,0 +1,25 @@ +import { Button, GridLayout } from "@salt-ds/core"; +import type { ReactElement } from "react"; + +export const Color = (): ReactElement => ( + + + + + + + + +); diff --git a/site/src/examples/button/Disabled.tsx b/site/src/examples/button/Disabled.tsx index 7f69ba70008..3e7bc60d76b 100644 --- a/site/src/examples/button/Disabled.tsx +++ b/site/src/examples/button/Disabled.tsx @@ -1,17 +1,26 @@ -import { Button } from "@salt-ds/core"; +import { Button, GridLayout } from "@salt-ds/core"; import { SendIcon } from "@salt-ds/icons"; import type { ReactElement } from "react"; export const Disabled = (): ReactElement => ( - <> - - - - + + + + ); diff --git a/site/src/examples/button/FocusableWhenDisabled.tsx b/site/src/examples/button/FocusableWhenDisabled.tsx new file mode 100644 index 00000000000..f07ff95f788 --- /dev/null +++ b/site/src/examples/button/FocusableWhenDisabled.tsx @@ -0,0 +1,36 @@ +import { Button, GridLayout } from "@salt-ds/core"; +import { SendIcon } from "@salt-ds/icons"; +import type { ReactElement } from "react"; + +export const FocusableWhenDisabled = (): ReactElement => ( + + + + + + + + +); diff --git a/site/src/examples/button/FullWidth.tsx b/site/src/examples/button/FullWidth.tsx index a3817e5d1ac..3584804ab64 100644 --- a/site/src/examples/button/FullWidth.tsx +++ b/site/src/examples/button/FullWidth.tsx @@ -3,8 +3,14 @@ import type { ReactElement } from "react"; export const FullWidth = (): ReactElement => ( - - - + + + ); diff --git a/site/src/examples/button/IconAndText.tsx b/site/src/examples/button/IconAndText.tsx index 951a3a2c717..e66aa08ea31 100644 --- a/site/src/examples/button/IconAndText.tsx +++ b/site/src/examples/button/IconAndText.tsx @@ -1,17 +1,26 @@ -import { Button } from "@salt-ds/core"; +import { Button, GridLayout } from "@salt-ds/core"; import { RefreshIcon, SearchIcon, SendIcon } from "@salt-ds/icons"; import type { ReactElement } from "react"; export const IconAndText = (): ReactElement => ( - <> - - - - + + + + ); diff --git a/site/src/examples/button/IconOnly.tsx b/site/src/examples/button/IconOnly.tsx index 50f3dbd7e19..8585ae69924 100644 --- a/site/src/examples/button/IconOnly.tsx +++ b/site/src/examples/button/IconOnly.tsx @@ -1,17 +1,26 @@ -import { Button } from "@salt-ds/core"; +import { Button, GridLayout } from "@salt-ds/core"; import { SearchIcon, SendIcon, SettingsSolidIcon } from "@salt-ds/icons"; import type { ReactElement } from "react"; export const IconOnly = (): ReactElement => ( - <> - - - - + + + + ); diff --git a/site/src/examples/button/index.ts b/site/src/examples/button/index.ts index ef1bd5f7f1f..4695439f9d9 100644 --- a/site/src/examples/button/index.ts +++ b/site/src/examples/button/index.ts @@ -1,3 +1,5 @@ +export * from "./Appearance"; +export * from "./Color"; export * from "./CTA"; export * from "./Disabled"; export * from "./IconAndText"; @@ -5,3 +7,4 @@ export * from "./IconOnly"; export * from "./Primary"; export * from "./Secondary"; export * from "./FullWidth"; +export * from "./FocusableWhenDisabled";