-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into task/WG-403-Create-Asset-Geometry-Component
- Loading branch information
Showing
12 changed files
with
294 additions
and
149 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.root { | ||
min-width: 100px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React from 'react'; | ||
import { Button, ButtonProps, ConfigProvider, ThemeConfig } from 'antd'; | ||
import styles from './Button.module.css'; | ||
|
||
const secondaryTheme: ThemeConfig = { | ||
components: { | ||
Button: { | ||
defaultActiveBg: '#f4f4f4', | ||
defaultActiveColor: '#222', | ||
defaultActiveBorderColor: '#026', | ||
defaultBg: '#f4f4f4', | ||
defaultBorderColor: '#222222', | ||
defaultColor: '#222222', | ||
defaultHoverBg: '#aac7ff', | ||
}, | ||
}, | ||
}; | ||
|
||
export const SecondaryButton: React.FC<ButtonProps> = (props) => { | ||
return ( | ||
<ConfigProvider theme={secondaryTheme}> | ||
<Button className={styles.root} {...props} /> | ||
</ConfigProvider> | ||
); | ||
}; | ||
|
||
const primaryButtonTheme: ThemeConfig = { | ||
components: { | ||
Button: { | ||
defaultActiveBg: '#74B566', | ||
defaultActiveColor: '#fff', | ||
defaultActiveBorderColor: '#74B566', | ||
defaultBg: '#74B566', | ||
defaultBorderColor: '#74B566', | ||
defaultColor: '#fff', | ||
defaultHoverBg: '#74b566d9', | ||
defaultHoverBorderColor: '#74b566d9', | ||
defaultHoverColor: '#fff', | ||
}, | ||
}, | ||
}; | ||
|
||
export const PrimaryButton: React.FC<ButtonProps> = (props) => { | ||
return ( | ||
<ConfigProvider theme={primaryButtonTheme}> | ||
<Button className={styles.root} {...props} /> | ||
</ConfigProvider> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './Button'; |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import React from 'react'; | ||
import './Icon.module.css'; | ||
|
||
const Icon: React.FC<{ className: string; label: string }> = ({ | ||
className, | ||
label, | ||
}) => { | ||
return <i className={className} role="img" aria-label={label} />; | ||
}; | ||
|
||
export default Icon; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as Icon } from './Icon'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.spinner { | ||
position: absolute; | ||
top: 50%; | ||
width: 100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Spin } from 'antd'; | ||
import React from 'react'; | ||
import styles from './Spinner.module.css'; | ||
|
||
const Spinner: React.FC = () => <Spin className={styles.spinner} />; | ||
|
||
export default Spinner; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default as Spinner } from './Spinner'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export { PrimaryButton, SecondaryButton } from './Button'; | ||
export { Icon } from './Icon'; | ||
export { Spinner } from './Spinner'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters