Skip to content

Commit 57cfac5

Browse files
committed
Add Progress to config
1 parent 0786483 commit 57cfac5

File tree

4 files changed

+52
-0
lines changed

4 files changed

+52
-0
lines changed

src/constants/componentCustomizations.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
import React from 'react';
22
import { CaretDown } from '@phosphor-icons/react';
33

4+
export const CustomizedProgress = {
5+
baseStyle: {
6+
borderRadius: 'full',
7+
colorScheme: 'primary',
8+
},
9+
};
10+
411
export const CustomizedHeading = {
512
baseStyle: {
613
fontWeight: 'semibold',

src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ export {
6161
MenuButton,
6262
MenuList,
6363
MenuItem,
64+
Progress,
6465
Select,
6566
SimpleGrid,
6667
Spacer,
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
import React from 'react';
2+
import { Meta, StoryFn } from '@storybook/react';
3+
4+
import { Progress } from '../..';
5+
import { COLOR_SCHEMES } from '../../constants/colorSchemes';
6+
7+
export default {
8+
title: 'Components/Progress',
9+
component: Progress,
10+
argTypes: {
11+
size: { options: ['xs', 'sm', 'md', 'lg'], control: { type: 'radio' } },
12+
colorScheme: {
13+
options: COLOR_SCHEMES,
14+
control: { type: 'radio' },
15+
},
16+
hasStripe: { control: { type: 'boolean' } },
17+
},
18+
} as Meta<typeof Progress>;
19+
20+
const Template: StoryFn<typeof Progress> = (args) => <Progress {...args} />;
21+
22+
// const defaultArgs = {
23+
// value: 50,
24+
// size: 'md',
25+
// borderRadius: 'full',
26+
// width: 'sm',
27+
// };
28+
export const Primary = Template.bind({});
29+
Primary.args = {
30+
colorScheme: 'primary',
31+
};
32+
33+
export const ColorScheme = Template.bind({});
34+
ColorScheme.args = {
35+
colorScheme: 'red',
36+
};
37+
38+
export const WithStripe = Template.bind({});
39+
WithStripe.args = {
40+
colorScheme: 'primary',
41+
hasStripe: true,
42+
};

src/utils/getTheme.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
CustomizedList,
1212
CustomizedNumberInput,
1313
CustomizedPinInput,
14+
CustomizedProgress,
1415
CustomizedSelect,
1516
CustomizedTable,
1617
CustomizedText,
@@ -62,6 +63,7 @@ const getTheme = ({ customColors, customFonts, customRadii }: Options) => {
6263
List: CustomizedList,
6364
NumberInput: CustomizedNumberInput,
6465
PinInput: CustomizedPinInput,
66+
Progress: CustomizedProgress,
6567
Select: CustomizedSelect,
6668
Table: CustomizedTable,
6769
Text: CustomizedText,

0 commit comments

Comments
 (0)