diff --git a/.storybook/main.js b/.storybook/main.js
index 7f8369b..754c624 100644
--- a/.storybook/main.js
+++ b/.storybook/main.js
@@ -1,4 +1,8 @@
module.exports = {
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
- addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
+ addons: [
+ '@storybook/addon-controls',
+ '@storybook/addon-links',
+ '@storybook/addon-essentials',
+ ],
};
diff --git a/.storybook/preview.js b/.storybook/preview.js
index 5d00c02..0d85c3f 100644
--- a/.storybook/preview.js
+++ b/.storybook/preview.js
@@ -1,4 +1,4 @@
-
export const parameters = {
- actions: { argTypesRegex: "^on[A-Z].*" },
-}
\ No newline at end of file
+ actions: { argTypesRegex: '^on[A-Z].*' },
+ controls: { expanded: true },
+};
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 981c9f7..f221f4a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,28 @@
`Camara` strictly follows [semantic versioning](https://semver.org/)
+## v1.0.0-beta.9 (Sat Mar 27, 2021)
+
+A change has been made to how the project gets updated. Going forward every new `beta` version is going to focus solely on a single component and try to improve on the component across its Storybook stories, docs, test, and real-world usage. This way we can move incrementally while knowing that we are thinking about each component in a comprehensive manner.
+
+- `Button` component:
+ - β remove `primary` prop option for setting the type of button.
+ - π `variant` prop is now used for setting the type of button from `primary`, `secondary` or `ghost`.
+ - β¨ `size` prop now updated with `large`, `small` and `medium` options.
+ - π `block` prop sets the option to fit button width to the full width of the parent
+ - π `loading` prop add a loading spinner indicator to be used when users have to wait for the result of their action after pressing a button.
+ - π `disabled` prop adds a visual indicator that a button is not interactive and restricts it from being pressed.
+ - π `danger` prop adds a visual indicator that the button action is destructive and irreversible in some case
+ - β remove `orientation` prop.
+ - β¨ rename `rounded` prop to `pill` to accurately describe the button shape
+ - β¨ hover, active and focused state has been improved.
+
+### Authors: 1
+
+- ααα΄ααΌ ααΖ³α΄α΄ ([@Preshonyee](https://github.com/Preshonyee))
+
+---
+
## v1.0.0-beta.8 (Thur Feb 04, 2021)
- minor package update
diff --git a/docs/README.md b/docs/README.md
deleted file mode 100644
index c8289e9..0000000
--- a/docs/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# smooth-doc-starter
-
-## [Docs](https://smooth-doc.com)
-
-**See the documentation at [smooth-doc.com](https://smooth-doc.com)** for more information about using Smooth DOC!
-
-## License
-
-Licensed under the MIT License, Copyright Β© 2020-present Greg BergΓ©.
-
-See [LICENSE](./LICENSE) for more information.
diff --git a/docs/pages/docs/components/button.mdx b/docs/pages/docs/components/button.mdx
index 6443d4f..1e8e8c3 100644
--- a/docs/pages/docs/components/button.mdx
+++ b/docs/pages/docs/components/button.mdx
@@ -56,3 +56,11 @@ render(
);
```
+
+## API
+
+Button properties
+
+| Property | Description | Type | Default | Version |
+| -------- | ------------------------------------ | --------- | ------- | ------- |
+| loading | Set the loading status of the button | `boolean` | false | |
diff --git a/package.json b/package.json
index 0d8d4a6..4ea5bb4 100644
--- a/package.json
+++ b/package.json
@@ -49,6 +49,7 @@
"@rollup/plugin-commonjs": "^17.1.0",
"@rollup/plugin-node-resolve": "^11.1.1",
"@storybook/addon-actions": "^6.0.27",
+ "@storybook/addon-controls": "^6.1.21",
"@storybook/addon-essentials": "^6.0.27",
"@storybook/addon-links": "^6.0.27",
"@storybook/react": "^6.1.16",
diff --git a/src/components/button/button.stories.tsx b/src/components/button/button.stories.tsx
index d26e21b..f19371c 100644
--- a/src/components/button/button.stories.tsx
+++ b/src/components/button/button.stories.tsx
@@ -1,68 +1,152 @@
import React from 'react';
-import { Button } from '.';
+import { Story, Meta } from '@storybook/react/types-6-0';
+import { Box, Flex } from '../layout';
-export default {
- title: 'Button',
-};
+import { Button, ButtonProps } from '.';
-// variants
-export const Primary = () => ;
-
-export const Secondary = () => ;
+export default {
+ title: 'Components/Button',
+ component: Button,
+ argTypes: {
+ backgroundColor: { control: 'color' },
+ color: { control: 'color' },
+ children: { control: 'text' },
+ },
+} as Meta;
-export const Ghost = () => ;
+const Template: Story = (args) => ;
-// sizes
+// Base default button
+export const Base = Template.bind({});
+Base.args = {
+ children: 'Say Hello',
+ onClick: () => alert('Hello Camara'),
+};
-export const Large = () => (
-
+// Variants
+export const Variants = (args: ButtonProps) => (
+
+
+
+
+
);
-export const Medium = () => (
-
+// sizes
+export const Sizes = (args: ButtonProps) => (
+
+
+
+
+
+
+
+
+
+
+
);
-export const Small = () => (
-
+// disabled buttons
+export const Disabled = (args: ButtonProps) => (
+
+
+
+
+
+
+
+
+
+
+
);
-// disabled button
-export const Disabled = () => (
-
+// danger buttons
+export const Danger = (args: ButtonProps) => (
+
+
+
+
+
+
+
+
+
+
+
);
-// danger button
-export const Danger = () => (
-
+// pill-shaped button
+export const Pill = (args: ButtonProps) => (
+
+
+
+
+
+
+
+
+
+
+
);
-// pill-shaped button
-export const Pill = () => (
-
+// full width button
+export const Block = (args: ButtonProps) => (
+
+
+
+
+
);
// With background color
-export const BackgroundColor = () => (
-