Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | 2x 11x 2x | // @flow strict
import React from 'react';
import Text from '../material-toolbox/typography/Text';
import Button from '../material-toolbox/button';
import ButtonIcon from '../material-toolbox/button/Icon';
type Props = {
title: string,
raised: boolean,
unelevated: boolean,
outlined: boolean,
disabled: boolean,
className?: string,
};
const Buttons = ({
title,
raised,
unelevated,
outlined,
disabled,
className,
}: Props) => (
<section>
<Text text="subtitle1" as="h3">
{title}
</Text>
<Button
className={className}
unelevated={unelevated}
raised={raised}
outlined={outlined}
disabled={disabled}
>
Baseline
</Button>
<Button
className={className}
unelevated={unelevated}
raised={raised}
outlined={outlined}
disabled={disabled}
dense
>
Dense
</Button>
<Button
className={className}
unelevated={unelevated}
raised={raised}
outlined={outlined}
disabled={disabled}
>
<ButtonIcon className="material-icons">favorite</ButtonIcon>
Icon
</Button>
<Button
className={className}
unelevated={unelevated}
raised={raised}
outlined={outlined}
disabled={disabled}
>
<ButtonIcon
as="svg"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="#000000"
>
<path fill="none" d="M0 0h24v24H0z" />
<path d="M23 12c0-6.07-4.93-11-11-11S1 5.93 1 12s4.93 11 11 11 11-4.93 11-11zM5 17.64C3.75 16.1 3 14.14 3 12c0-2.13.76-4.08 2-5.63v11.27zM17.64 5H6.36C7.9 3.75 9.86 3 12 3s4.1.75 5.64 2zM12 14.53L8.24 7h7.53L12 14.53zM17 9v8h-4l4-8zm-6 8H7V9l4 8zm6.64 2c-1.55 1.25-3.51 2-5.64 2s-4.1-.75-5.64-2h11.28zM21 12c0 2.14-.75 4.1-2 5.64V6.37c1.24 1.55 2 3.5 2 5.63z" />
</ButtonIcon>
SVG Icon
</Button>
<Button
className={className}
outlined={outlined}
unelevated={unelevated}
raised={raised}
as="a"
href="#" // eslint-disable-line
>
Link
</Button>
</section>
);
Buttons.defaultProps = {
raised: false,
unelevated: false,
outlined: false,
disabled: false,
};
export default Buttons;
|