-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
94 changed files
with
1,487 additions
and
852 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,47 @@ | ||
import React from 'react'; | ||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; | ||
import { Button } from '@carbon/react'; | ||
|
||
const Button = props => { | ||
const { className, handler } = props; | ||
|
||
const classes = className ? `btn ${className}` : `btn`; | ||
|
||
const CustomButton = ({ className, handler, children, ...additionalProps }) => { | ||
return ( | ||
<button | ||
className={classes} | ||
type='button' | ||
<Button | ||
{...additionalProps} | ||
className={className ? `btn ${className}` : `btn`} | ||
onClick={handler} | ||
> | ||
{props.children} | ||
</button> | ||
{children} | ||
</Button> | ||
); | ||
}; | ||
|
||
const IconButton = props => { | ||
const { faIcon, handler, isPrimary } = props; | ||
|
||
const classes = isPrimary ? 'icon-btn primary-icon-btn' : 'icon-btn'; | ||
|
||
const IconButton = ({ faIcon, ...additionalProps }) => { | ||
return ( | ||
<button | ||
className={classes} | ||
type='button' | ||
onClick={handler} | ||
<Button | ||
{...additionalProps} | ||
className='icon-btn cds--btn--icon-only' | ||
kind='ghost' | ||
size='lg' | ||
> | ||
<FontAwesomeIcon icon={faIcon} /> | ||
</button> | ||
</Button> | ||
); | ||
}; | ||
|
||
const LabelledIconButton = props => { | ||
const { faIcon, handler, isPrimary } = props; | ||
|
||
const classes = isPrimary | ||
? 'icon-btn primary-icon-btn e-labelled-icon-btn' | ||
: 'icon-btn e-labelled-icon-btn'; | ||
|
||
const LabelledIconButton = ({ | ||
faIcon, | ||
isPrimary, | ||
children, | ||
...additionalProps | ||
}) => { | ||
return ( | ||
<button | ||
className={classes} | ||
type='button' | ||
onClick={handler} | ||
<Button | ||
{...additionalProps} | ||
className='btn' | ||
kind={isPrimary ? 'primary' : 'ghost'} | ||
> | ||
<FontAwesomeIcon icon={faIcon} /> | ||
{props.children} | ||
</button> | ||
{children} | ||
</Button> | ||
); | ||
}; | ||
|
||
export { Button, IconButton, LabelledIconButton }; | ||
export { CustomButton as Button, IconButton, LabelledIconButton }; |
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 |
---|---|---|
@@ -1,22 +1,17 @@ | ||
import TitleBar from 'components/TitleBar/TitleBar'; | ||
import React from 'react'; | ||
import { Tile } from '@carbon/react'; | ||
|
||
|
||
const Card = props => { | ||
const { className, title } = props; | ||
|
||
const classes = className ? `card ${className}` : `card`; | ||
|
||
return ( | ||
<div className={classes}> | ||
<TitleBar> | ||
{title} | ||
</TitleBar> | ||
<div className="content-slot"> | ||
{props.children} | ||
</div> | ||
</div> | ||
); | ||
const Card = ({ className, title, children }) => { | ||
return ( | ||
<Tile | ||
className={ | ||
className ? `card common-card ${className}` : `card common-card` | ||
} | ||
> | ||
<TitleBar>{title}</TitleBar> | ||
<div className='content-slot'>{children}</div> | ||
</Tile> | ||
); | ||
}; | ||
|
||
export default Card; | ||
export default Card; |
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
13 changes: 13 additions & 0 deletions
13
meal-ui/src/components/MinimalistSidebar/HeroBrandingLogo.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,13 @@ | ||
export function HeroBrandingLogo({ config, onClick }) { | ||
return ( | ||
<div className='hero-branding-logo'> | ||
<button | ||
type='button' | ||
onClick={onClick} | ||
> | ||
<h1 className='hero-title'>{config.BrandName}</h1> | ||
</button> | ||
<div className='divider' /> | ||
</div> | ||
); | ||
} |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.