-
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 'develop' of https://github.com/leemonade/bubbles into d…
…evelop * 'develop' of https://github.com/leemonade/bubbles: chore: version bump feat(FileUpload): Add border to selected files and status icon chore: version bump feat(ProgressBottomBar): new component fix(TextEditor): readOnly refresh feat(ComputerKeyboardNext): change SVG fix(Accordion): set hover color to transparent chore: version bump
- Loading branch information
Showing
30 changed files
with
545 additions
and
57 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
40 changes: 40 additions & 0 deletions
40
packages/components/src/informative/ProgressBottomBar/ProgressBottomBar.constants.js
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,40 @@ | ||
import propTypes from 'prop-types'; | ||
|
||
export const PROGRESSBOTTOMBAR_RADIUS = ['xs', 'sm', 'md', 'lg', 'xl']; | ||
export const PROGRESSBOTTOMBAR_SIZES = ['xs', 'sm', 'md', 'lg', 'xl']; | ||
|
||
// SECTIONS PROP EXAMPLE | ||
// If you want to use sections prop, you need to pass an array of objects with value, color and label keys. | ||
// only value and color keys are required. | ||
// | ||
// sections={[ | ||
// { value: 33, color: 'pink', label: 'Documents', tooltip: 'Document – 33 Gb' }, | ||
// { value: 28, color: 'grape', label: 'Apps', tooltip: 'Apps – 28 Gb' }, | ||
// { value: 25, color: 'violet', label: 'Other', tooltip: 'Other – 25 Gb' }, | ||
// ]} | ||
|
||
export const PROGRESSBOTTOMBAR_DEFAULT_PROPS = { | ||
animate: false, | ||
color: 'orange', | ||
label: '', | ||
labelLeft: 'labelLeft', | ||
labelRight: 'LabelRight', | ||
radius: 'lg', | ||
sections: null, | ||
size: 'sm', | ||
striped: false, | ||
value: 100, | ||
}; | ||
|
||
export const PROGRESSBOTTOMBAR_PROP_TYPES = { | ||
animate: propTypes.bool, | ||
color: propTypes.string, | ||
label: propTypes.string, | ||
labelLeft: propTypes.string, | ||
labelRight: propTypes.string, | ||
radius: propTypes.oneOf(PROGRESSBOTTOMBAR_RADIUS), | ||
sections: propTypes.array, | ||
size: propTypes.oneOf(PROGRESSBOTTOMBAR_SIZES), | ||
striped: propTypes.bool, | ||
value: propTypes.number, | ||
}; |
48 changes: 48 additions & 0 deletions
48
packages/components/src/informative/ProgressBottomBar/ProgressBottomBar.js
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,48 @@ | ||
import React from 'react'; | ||
import { Progress as MantineProgress } from '@mantine/core'; | ||
import { Box, Text } from '@bubbles-ui/components'; | ||
import { | ||
PROGRESSBOTTOMBAR_DEFAULT_PROPS, | ||
PROGRESSBOTTOMBAR_PROP_TYPES, | ||
} from './ProgressBottomBar.constants'; | ||
import { ProgressBottomBarStyles } from './ProgressBottomBar.styles'; | ||
|
||
const ProgressBottomBar = ({ | ||
animate, | ||
label, | ||
labelTop, | ||
color, | ||
radius, | ||
sections, | ||
size, | ||
striped, | ||
value, | ||
}) => { | ||
const { classes, theme } = ProgressBottomBarStyles(); | ||
return ( | ||
<Box> | ||
{labelTop && ( | ||
<Box className={classes.topLabelContainer}> | ||
<Text className={classes.labelTop}>{labelTop}</Text> | ||
</Box> | ||
)} | ||
<MantineProgress | ||
value={value} | ||
label={label} | ||
color={'#4D5358'} | ||
animate={animate} | ||
radius={radius} | ||
sections={sections} | ||
size={size} | ||
striped={striped} | ||
/> | ||
</Box> | ||
); | ||
}; | ||
|
||
ProgressBottomBar.propTypes = PROGRESSBOTTOMBAR_PROP_TYPES; | ||
ProgressBottomBar.defaultProps = PROGRESSBOTTOMBAR_DEFAULT_PROPS; | ||
ProgressBottomBar.displayName = 'ProgressBottomBar'; | ||
|
||
export { ProgressBottomBar }; | ||
export default ProgressBottomBar; |
Oops, something went wrong.