File tree Expand file tree Collapse file tree 2 files changed +36
-12
lines changed Expand file tree Collapse file tree 2 files changed +36
-12
lines changed Original file line number Diff line number Diff line change @@ -6,12 +6,30 @@ export default {
66 title : "Library / Reservation header" ,
77 component : ReservationHeader ,
88 decorators : [ withDesign ] ,
9- argTypes : { } ,
10- parameters : { } ,
9+ argTypes : {
10+ author : {
11+ defaultValue : "Af Isabel Sánchez Vegara, Amaia Arrazola (2018)" ,
12+ control : "text" ,
13+ } ,
14+ label : {
15+ defaultValue : "BOG" ,
16+ control : "text" ,
17+ } ,
18+ title : {
19+ defaultValue : "Steven Hawking" ,
20+ control : "text" ,
21+ } ,
22+ } ,
23+ parameters : {
24+ design : {
25+ type : "figma" ,
26+ url : "https://www.figma.com/file/xouARmJCONbzbZhpD8XpcM/Brugerprofil?node-id=2052%3A72452" ,
27+ } ,
28+ } ,
1129} as ComponentMeta < typeof ReservationHeader > ;
1230
13- const Template : ComponentStory < typeof ReservationHeader > = ( ) => (
14- < ReservationHeader />
31+ const Template : ComponentStory < typeof ReservationHeader > = ( props ) => (
32+ < ReservationHeader { ... props } />
1533) ;
1634
1735export const ReservationHeaderExample = Template . bind ( { } ) ;
Original file line number Diff line number Diff line change 11import { Material } from "../material/Material" ;
22
3- const ReservationHeader = ( ) => {
3+ export type ReservationHeaderProps = {
4+ author : string ;
5+ label : string ;
6+ title : string ;
7+ } ;
8+
9+ const ReservationHeader = ( {
10+ author,
11+ label,
12+ title,
13+ } : ReservationHeaderProps ) => {
414 return (
515 < div className = "dpl-reservation-header" >
616 < div className = "dpl-reservation-header__material" >
@@ -12,13 +22,9 @@ const ReservationHeader = () => {
1222 />
1323 </ div >
1424 < div className = "dpl-reservation-header__container" >
15- < div className = "dpl-reservation-header__container__tag" > BOG</ div >
16- < div className = "dpl-reservation-header__container__header" >
17- Steven Hawking
18- </ div >
19- < div className = "dpl-reservation-header__container__text" >
20- Af Isabel Sánchez Vegara, Amaia Arrazola (2018)
21- </ div >
25+ < div className = "dpl-reservation-header__container__tag" > { label } </ div >
26+ < div className = "dpl-reservation-header__container__header" > { title } </ div >
27+ < div className = "dpl-reservation-header__container__text" > { author } </ div >
2228 </ div >
2329 </ div >
2430 ) ;
You can’t perform that action at this time.
0 commit comments