diff --git a/.changeset/fluffy-files-press.md b/.changeset/fluffy-files-press.md new file mode 100644 index 00000000..6d250bfa --- /dev/null +++ b/.changeset/fluffy-files-press.md @@ -0,0 +1,5 @@ +--- +"@cambly/syntax-core": minor +--- + +Button/Chip/IconButton/LinkButton: add 'on' lightBackground or darkBackground prop (Cambio only) diff --git a/packages/syntax-core/package.json b/packages/syntax-core/package.json index c9bff360..386b4655 100644 --- a/packages/syntax-core/package.json +++ b/packages/syntax-core/package.json @@ -14,7 +14,7 @@ "scripts": { "build": "tsup", "clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist", - "dev": "NODE_OPTIONS=--max_old_space_size=4096 tsup --watch", + "dev": "NODE_OPTIONS=--max_old_space_size=8192 tsup --watch", "lint": "TIMING=1 eslint \"src/**/*.ts*\" --max-warnings 0", "stylelint": "stylelint \"**/*.css\"", "stylelint:fix": "npm run stylelint --fix", diff --git a/packages/syntax-core/src/Button/Button.stories.tsx b/packages/syntax-core/src/Button/Button.stories.tsx index aa75c506..6b100952 100644 --- a/packages/syntax-core/src/Button/Button.stories.tsx +++ b/packages/syntax-core/src/Button/Button.stories.tsx @@ -1,6 +1,7 @@ import { type StoryObj, type Meta } from "@storybook/react"; import Button from "./Button"; import FavoriteBorder from "@mui/icons-material/FavoriteBorder"; +import Box from "../Box/Box"; export default { title: "Components/Button", @@ -11,6 +12,20 @@ export default { url: "https://www.figma.com/file/p7LKna9JMU0JEkcKamzs53/Cambly-Design-System-(Draft)?node-id=994%3A2346", }, }, + args: { + text: "Call to action", + color: "primary", + on: "lightBackground", + size: "md", + disabled: false, + loading: false, + fullWidth: false, + "data-testid": "", + loadingText: "", + accessibilityLabel: "", + tooltip: "", + type: "button", + }, argTypes: { color: { options: [ @@ -29,6 +44,10 @@ export default { ], control: { type: "radio" }, }, + on: { + options: ["lightBackground", "darkBackground"], + control: { type: "radio" }, + }, size: { options: ["sm", "md", "lg"], control: { type: "radio" }, @@ -43,12 +62,25 @@ export default { control: "boolean", }, onClick: { action: "clicked" }, + type: { + options: ["button", "submit", "reset"], + }, }, tags: ["autodocs"], } as Meta; export const Default: StoryObj = { args: { text: "Call to action" }, + render: (args) => { + return ( + +