Skip to content

Commit

Permalink
feat: add Accordion and Collapsible components (#1364)
Browse files Browse the repository at this point in the history
- Stable release
- Update imports from PRE_RELEASE to stable
- Conducted final sanity testing, see screen recordings below
  • Loading branch information
divyanshu013 committed Jun 27, 2023
1 parent a55bd84 commit 0478669
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 deletions.
9 changes: 9 additions & 0 deletions .changeset/fuzzy-squids-burn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'@razorpay/blade': minor
---

feat: add `Accordion` and `Collapsible` components

> **Note**
>
> If you're upgrading from earlier PRE_RELEASE, there are no breaking changes in the API, however there are some changes in the rendered markup which may require updating any snapshots (if any) at your end
6 changes: 3 additions & 3 deletions packages/blade/src/components/Accordion/Accordion.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Page = (): ReactElement => {
return (
<StoryPageWrapper
componentName="Accordion"
componentDescription="[Only available for web PRE RELEASE currently]: An accordion is used to allow users to toggle between different content sections in a compact vertical stack."
componentDescription="An accordion is used to allow users to toggle between different content sections in a compact vertical stack."
figmaURL={{
paymentTheme:
'https://www.figma.com/file/LSG77hEeVYDk7j7WV7OMJE/Blade-DSL---Components-Guideline?type=design&node-id=79-629874&t=sVxH3DOnx3L3F9rO-0',
Expand All @@ -30,7 +30,7 @@ const Page = (): ReactElement => {
<Title>Usage</Title>
<Sandbox editorHeight={500}>
{`
import { Accordion_PRE_RELEASE as Accordion, AccordionItem } from '@razorpay/blade/components';
import { Accordion, AccordionItem } from '@razorpay/blade/components';
function App() {
return (
Expand Down Expand Up @@ -59,7 +59,7 @@ const Page = (): ReactElement => {
};

const meta: Meta<AccordionProps> = {
title: 'Components/Accordion (PRE RELEASE)',
title: 'Components/Accordion',
component: AccordionComponent,
args: {},
argTypes: {
Expand Down
2 changes: 1 addition & 1 deletion packages/blade/src/components/Accordion/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { Accordion as Accordion_PRE_RELEASE } from './Accordion';
export { Accordion } from './Accordion';
export type { AccordionProps } from './Accordion';

export * from './AccordionItem';
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const Page = (): ReactElement => {
return (
<StoryPageWrapper
componentName="Collapsible"
componentDescription="[Only available for web PRE RELEASE currently]: Collapsible is used to allow users to toggle the visibility of hidden content within a container."
componentDescription="Collapsible is used to allow users to toggle the visibility of hidden content within a container."
figmaURL={{
paymentTheme:
'https://www.figma.com/file/LSG77hEeVYDk7j7WV7OMJE/Blade-DSL---Components-Guideline?type=design&node-id=79-629874&t=sVxH3DOnx3L3F9rO-0',
Expand All @@ -29,7 +29,7 @@ const Page = (): ReactElement => {
<Title>Usage</Title>
<Sandbox editorHeight={500}>
{`
import { Collapsible_PRE_RELEASE as Collapsible, CollapsibleButton, CollapsibleBody, Text, Amount, Box } from '@razorpay/blade/components';
import { Collapsible, CollapsibleButton, CollapsibleBody, Text, Amount, Box } from '@razorpay/blade/components';
function App() {
return (
Expand Down Expand Up @@ -78,7 +78,7 @@ const Page = (): ReactElement => {
};

const meta: Meta<CollapsibleProps> = {
title: 'Components/Collapsible (PRE RELEASE)',
title: 'Components/Collapsible',
component: CollapsibleComponent,
args: {},
argTypes: {
Expand Down
2 changes: 1 addition & 1 deletion packages/blade/src/components/Collapsible/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export { Collapsible as Collapsible_PRE_RELEASE } from './Collapsible';
export { Collapsible } from './Collapsible';
export type { CollapsibleProps } from './Collapsible';

export * from './CollapsibleLink';
Expand Down

0 comments on commit 0478669

Please sign in to comment.