The Open Standard for Generative UI
Update FollowUpItem component styles and structure (#222)
subham9f850e6d94e4
diff --git a/js/packages/react-ui/src/components/FollowUpItem/FollowUpItem.tsx b/js/packages/react-ui/src/components/FollowUpItem/FollowUpItem.tsxindex 5a5260924..46963a165 100644--- a/js/packages/react-ui/src/components/FollowUpItem/FollowUpItem.tsx+++ b/js/packages/react-ui/src/components/FollowUpItem/FollowUpItem.tsx@@ -11,8 +11,8 @@ const FollowUpItem = forwardRef<HTMLButtonElement, FollowUpItemProps>((props, reconst { className, text, icon, ...rest } = props;return (<button ref={ref} className={clsx("crayon-follow-up-item", className)} {...rest}>- {text}- {icon}+ {text && <span className="crayon-follow-up-item-text">{text}</span>}+ {icon && <span className="crayon-follow-up-item-icon">{icon}</span>}</button>);});diff --git a/js/packages/react-ui/src/components/FollowUpItem/followUpItem.scss b/js/packages/react-ui/src/components/FollowUpItem/followUpItem.scssindex da8180808..bdda2a57d 100644--- a/js/packages/react-ui/src/components/FollowUpItem/followUpItem.scss+++ b/js/packages/react-ui/src/components/FollowUpItem/followUpItem.scss@@ -5,7 +5,7 @@@include cssUtils.typography(primary, default);box-sizing: border-box;padding: cssUtils.$spacing-s cssUtils.$spacing-0;- border-bottom: 1px solid cssUtils.$stroke-interactive-el;+ border-bottom: 1px solid cssUtils.$stroke-default;background-color: transparent;gap: cssUtils.$spacing-s;display: flex;@@ -15,7 +15,17 @@color: cssUtils.$primary-text;cursor: pointer;text-align: left;-+ &-icon {+ size: 16px;+ }+ &-text {+ flex: 1;+ white-space: break-spaces;+ word-break: break-word;+ max-width: 100%;+ text-align: left;+ color: cssUtils.$primary-text;+ }&:last-child {border-bottom: none;}