forked from the-standard/decentralised-dashboard
-
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.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
25 changed files
with
174 additions
and
152 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { | ||
Button as DaisyButton, | ||
} from 'react-daisyui'; | ||
|
||
const Button = (props) => { | ||
const { | ||
className, | ||
shape, | ||
size, | ||
variant, | ||
color, | ||
glass, | ||
wide, | ||
fullWidth, | ||
loading, | ||
disabled, | ||
onClick | ||
} = props; | ||
|
||
console.log() | ||
|
||
return ( | ||
<DaisyButton | ||
className={` ${className ? className : ''}`} | ||
shape={'' || shape} | ||
size={'' || size} | ||
variant={null || variant} | ||
color={null || color} | ||
glass={false || glass} | ||
wide={false || wide} | ||
fullWidth={false || fullWidth} | ||
loading={false || loading} | ||
disabled={false || disabled} | ||
onClick={onClick ? ( | ||
onClick | ||
) : ( | ||
() => null | ||
)} | ||
> | ||
{props.children} | ||
</DaisyButton> | ||
); | ||
}; | ||
|
||
export default Button; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,49 @@ | ||
const Typography = (props) => { | ||
const type = props.variant || ''; | ||
const customClasses = props.className || ''; | ||
|
||
let useClass = 'text-base font-normal'; | ||
const classes = props.className || ''; | ||
|
||
switch (type) { | ||
case 'p': | ||
useClass = 'inline-block text-base font-normal'; | ||
break; | ||
return ( | ||
<p | ||
className={`inline-block text-base font-normal ${classes ? classes : ''}`} | ||
> | ||
{props.children || ''} | ||
</p> | ||
); | ||
case 'h1': | ||
useClass = 'inline-block text-2xl font-semibold'; | ||
break; | ||
return ( | ||
<h1 | ||
className={`inline-block text-2xl font-semibold ${classes ? classes : ''}`} | ||
> | ||
{props.children || ''} | ||
</h1> | ||
); | ||
case 'h2': | ||
useClass = 'inline-block text-xl font-semibold'; | ||
break; | ||
return ( | ||
<h2 | ||
className={`inline-block text-xl font-semibold ${classes ? classes : ''}`} | ||
> | ||
{props.children || ''} | ||
</h2> | ||
); | ||
case 'h3': | ||
useClass = 'inline-block text-lg font-medium'; | ||
break; | ||
return ( | ||
<h3 | ||
className={`inline-block text-lg font-medium ${classes ? classes : ''}`} | ||
> | ||
{props.children || ''} | ||
</h3> | ||
); | ||
default: | ||
useClass = 'inline-block text-base'; | ||
break; | ||
} | ||
|
||
return ( | ||
<div | ||
className={useClass + ' ' + customClasses} | ||
> | ||
{props.children || ''} | ||
</div> | ||
); | ||
return ( | ||
<p | ||
className={`inline-block text-base ${classes ? classes : ''}`} | ||
> | ||
{props.children || ''} | ||
</p> | ||
); | ||
} | ||
}; | ||
|
||
export default Typography; |
Oops, something went wrong.