diff --git a/package.json b/package.json index 92512898..9d77dcec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@user-interviews/ui-design-system", - "version": "3.3.1", + "version": "3.3.2", "dependencies": { "@tiptap/core": "^2.4.0", "@tiptap/extension-bold": "^2.4.0", diff --git a/src/Accordion/Accordion.mdx b/src/Accordion/Accordion.mdx index 7d68ba3e..57ba8bdd 100644 --- a/src/Accordion/Accordion.mdx +++ b/src/Accordion/Accordion.mdx @@ -65,3 +65,7 @@ When multiple Cards are stacked, you want to ensure there is proper content alig ### Disabled + +### Alert + + diff --git a/src/Accordion/Accordion.stories.tsx b/src/Accordion/Accordion.stories.tsx index 36ab0e7d..c439715e 100644 --- a/src/Accordion/Accordion.stories.tsx +++ b/src/Accordion/Accordion.stories.tsx @@ -390,3 +390,27 @@ Disabled.args = { helperText: 'helper text', title: 'Accordion Toggle -- disabled', }; + +export const AccordionAlert = (args) => ( + + + + +
+ Add content here. +
+
+
+
+); + +AccordionAlert.args = { + chevronLateral: true, + chevronLeft: true, + disabled: false, + helperText: 'helper text', + title: 'Accordion Alert', +}; diff --git a/src/Accordion/AccordionCollapse.scss b/src/Accordion/AccordionCollapse.scss index cfa78671..8fc54a3d 100644 --- a/src/Accordion/AccordionCollapse.scss +++ b/src/Accordion/AccordionCollapse.scss @@ -6,4 +6,13 @@ &__container { padding: 16px 24px; } + + &--info { + border-top: none !important; + color: var(--ux-gray-900); + } + + &--noTopPadding { + padding-top: 0px !important; + } } diff --git a/src/Accordion/AccordionCollapse.tsx b/src/Accordion/AccordionCollapse.tsx index cec48727..9dc3c2c9 100644 --- a/src/Accordion/AccordionCollapse.tsx +++ b/src/Accordion/AccordionCollapse.tsx @@ -6,6 +6,7 @@ import RBAccordionCollapse from 'react-bootstrap/AccordionCollapse'; import './AccordionCollapse.scss'; type AccordionCollapseProps = { + variant?: string; children: React.ReactNode; /** A unique key used to control this item's collapse/expand. @@ -16,6 +17,7 @@ type AccordionCollapseProps = { }; const AccordionCollapse = ({ + variant, children, eventKey, @@ -25,17 +27,28 @@ const AccordionCollapse = ({ ...props }: AccordionCollapseProps) => ( -
+
{children}
); AccordionCollapse.defaultProps = { + variant: undefined, UNSAFE_className: undefined, }; diff --git a/src/Accordion/AccordionItem.scss b/src/Accordion/AccordionItem.scss index dd04b1cd..fcc74d07 100644 --- a/src/Accordion/AccordionItem.scss +++ b/src/Accordion/AccordionItem.scss @@ -17,4 +17,9 @@ &--borderless { border: none; } + + &--info { + background-color: var(--ux-blue-100); + color: var(--ux-blue-800); + } } diff --git a/src/Accordion/AccordionItem.tsx b/src/Accordion/AccordionItem.tsx index 87def695..2c3270c8 100644 --- a/src/Accordion/AccordionItem.tsx +++ b/src/Accordion/AccordionItem.tsx @@ -18,9 +18,11 @@ type AccordionItemProps = { UNSAFE_className?: string; children: React.ReactNode; eventKey: string; + variant?: string; }; const AccordionItem = ({ + variant, as, borderless, children, @@ -33,6 +35,7 @@ const AccordionItem = ({ className={classNames( UNSAFE_className, 'AccordionItem', + variant === 'info' && 'AccordionItem--info', borderless && 'AccordionItem--borderless', )} eventKey={eventKey} @@ -42,6 +45,7 @@ const AccordionItem = ({ ); AccordionItem.defaultProps = { + variant: undefined, as: undefined, borderless: undefined, UNSAFE_className: undefined, diff --git a/src/Select/Option.jsx b/src/Select/Option.jsx index 2568dc85..bbc7d0d1 100644 --- a/src/Select/Option.jsx +++ b/src/Select/Option.jsx @@ -17,14 +17,16 @@ import './Option.scss'; const Option = forwardRef(({ indeterminate, ...props }, ref) => (
- null} - /> +
+ null} + /> +