HomePaymentsNo-codeDevelopersContribute
Safepay Home PageLive DashboardTest Dashboard

Collapsible


Usage

Basic Collapsible usage
  import React from 'react';
  import { Collapsible } from "~/ui/components/Collapsible"

  export default function App() {
    return (
      <div style={styles.container}>
        <p>Collapsible Example</p>
        <Collapsible summary={<><h4>Props table</h4>Description of props in a collapsible table view</>}>
        | Option                  | Description                         |
        | ----------------------- | ------------------------------------|
        | `example prop A`        | Description about how to use prop A |
        | `example prop B`        | Description about how to use prop B |
        | `example prop C`        | Description about how to use prop C |

        </Collapsible>
      </div>
    );
  }

Example

Props table

Description of props in a collapsible table view
OptionDescription
example prop ADescription about how to use prop A
example prop BDescription about how to use prop B
example prop CDescription about how to use prop C

Props

Prop NameTypeDefaultDescription
summaryReactNode-The content of the collapsible summary.
openbooleanundefinedIf the collapsible should be rendered "open" by default.
childrenReactNode-The content to be collapsed.