@@ -508,4 +508,186 @@ export const PillsOnly: Story = {
508
508
}
509
509
} ;
510
510
511
+ export const WithFooterActions : Story = {
512
+ args : {
513
+ ...Default . args ,
514
+ footerActions : [
515
+ {
516
+ label : "View Details" ,
517
+ onClick : e => {
518
+ action ( "view-details-clicked" ) ( e ) ;
519
+ window . alert ( "View Details clicked" ) ;
520
+ } ,
521
+ variant : "primary" ,
522
+ icon : < Icon iconName = 'IconEye' className = 'w-4 h-4' />
523
+ } ,
524
+ {
525
+ label : "Share" ,
526
+ onClick : e => {
527
+ action ( "share-clicked" ) ( e ) ;
528
+ window . alert ( "Share clicked" ) ;
529
+ } ,
530
+ variant : "outlined" ,
531
+ icon : < Icon iconName = 'IconShare' className = 'w-4 h-4' />
532
+ }
533
+ ]
534
+ }
535
+ } ;
536
+
537
+ export const WithSingleFooterAction : Story = {
538
+ args : {
539
+ ...Default . args ,
540
+ footerActions : [
541
+ {
542
+ label : "Read More" ,
543
+ onClick : e => {
544
+ action ( "read-more-clicked" ) ( e ) ;
545
+ window . alert ( "Read More clicked" ) ;
546
+ } ,
547
+ variant : "primary" ,
548
+ icon : < Icon iconName = 'IconArrowRight' className = 'w-4 h-4' />
549
+ }
550
+ ]
551
+ }
552
+ } ;
553
+
554
+ export const WithMultipleFooterActions : Story = {
555
+ args : {
556
+ ...Default . args ,
557
+ footerActions : [
558
+ {
559
+ label : "Like" ,
560
+ onClick : e => {
561
+ action ( "like-clicked" ) ( e ) ;
562
+ window . alert ( "Like clicked" ) ;
563
+ } ,
564
+ variant : "primary" ,
565
+ icon : < Icon iconName = 'IconHeart' className = 'w-4 h-4' />
566
+ } ,
567
+ {
568
+ label : "Comment" ,
569
+ onClick : e => {
570
+ action ( "comment-clicked" ) ( e ) ;
571
+ window . alert ( "Comment clicked" ) ;
572
+ } ,
573
+ variant : "outlined" ,
574
+ icon : < Icon iconName = 'IconMessage' className = 'w-4 h-4' />
575
+ } ,
576
+ {
577
+ label : "Save" ,
578
+ onClick : e => {
579
+ action ( "save-clicked" ) ( e ) ;
580
+ window . alert ( "Save clicked" ) ;
581
+ } ,
582
+ variant : "outlined" ,
583
+ icon : < Icon iconName = 'IconBookmark' className = 'w-4 h-4' />
584
+ } ,
585
+ {
586
+ label : "Delete" ,
587
+ onClick : e => {
588
+ action ( "delete-clicked" ) ( e ) ;
589
+ window . alert ( "Delete clicked" ) ;
590
+ } ,
591
+ variant : "danger" ,
592
+ icon : < Icon iconName = 'IconDeleteBin' className = 'w-4 h-4' />
593
+ }
594
+ ]
595
+ }
596
+ } ;
597
+
598
+ export const WithTopAndBottomActions : Story = {
599
+ args : {
600
+ ...Default . args ,
601
+ actions : [
602
+ {
603
+ label : "Edit" ,
604
+ onClick : e => {
605
+ action ( "edit-clicked" ) ( e ) ;
606
+ window . alert ( "Edit action clicked" ) ;
607
+ } ,
608
+ variant : "primary" ,
609
+ icon : < Icon iconName = 'IconEdit' className = 'w-4 h-4' />
610
+ }
611
+ ] ,
612
+ footerActions : [
613
+ {
614
+ label : "View Comments" ,
615
+ onClick : e => {
616
+ action ( "view-comments-clicked" ) ( e ) ;
617
+ window . alert ( "View Comments clicked" ) ;
618
+ } ,
619
+ variant : "outlined" ,
620
+ icon : < Icon iconName = 'IconMessage' className = 'w-4 h-4' />
621
+ } ,
622
+ {
623
+ label : "Share Article" ,
624
+ onClick : e => {
625
+ action ( "share-article-clicked" ) ( e ) ;
626
+ window . alert ( "Share Article clicked" ) ;
627
+ } ,
628
+ variant : "primary" ,
629
+ icon : < Icon iconName = 'IconShare' className = 'w-4 h-4' />
630
+ }
631
+ ]
632
+ }
633
+ } ;
634
+
635
+ export const FooterActionsNoImage : Story = {
636
+ args : {
637
+ ...Default . args ,
638
+ data : {
639
+ ...defaultData ,
640
+ image : undefined
641
+ } ,
642
+ footerActions : [
643
+ {
644
+ label : "Continue Reading" ,
645
+ onClick : e => {
646
+ action ( "continue-reading-clicked" ) ( e ) ;
647
+ window . alert ( "Continue Reading clicked" ) ;
648
+ } ,
649
+ variant : "primary" ,
650
+ icon : < Icon iconName = 'IconArrowRight' className = 'w-4 h-4' />
651
+ } ,
652
+ {
653
+ label : "Add to Favorites" ,
654
+ onClick : e => {
655
+ action ( "add-to-favorites-clicked" ) ( e ) ;
656
+ window . alert ( "Add to Favorites clicked" ) ;
657
+ } ,
658
+ variant : "outlined" ,
659
+ icon : < Icon iconName = 'IconHeart' className = 'w-4 h-4' />
660
+ }
661
+ ]
662
+ }
663
+ } ;
664
+
665
+ export const ConditionalFooterActions : Story = {
666
+ args : {
667
+ ...Default . args ,
668
+ footerActions : [
669
+ {
670
+ label : "Visible Action" ,
671
+ onClick : e => {
672
+ action ( "visible-action-clicked" ) ( e ) ;
673
+ window . alert ( "Visible Action clicked" ) ;
674
+ } ,
675
+ variant : "primary" ,
676
+ show : true ,
677
+ icon : < Icon iconName = 'IconCheck' className = 'w-4 h-4' />
678
+ } ,
679
+ {
680
+ label : "Hidden Action" ,
681
+ onClick : e => {
682
+ action ( "hidden-action-clicked" ) ( e ) ;
683
+ window . alert ( "Hidden Action clicked" ) ;
684
+ } ,
685
+ variant : "danger" ,
686
+ show : false ,
687
+ icon : < Icon iconName = 'IconX' className = 'w-4 h-4' />
688
+ }
689
+ ]
690
+ }
691
+ } ;
692
+
511
693
export default CardStories ;
0 commit comments