Norsk Tipping Design System

ButtonItem

Install

yarn add @ntds/dropdown

Import

import { Dropdown } from '@ntds/dropdown';

Usage

<Dropdown
    items={() => (
        <>
            <Dropdown.Group>
                <Dropdown.Item
                    checked
                    onChange={() => {}}
                    value='value'
                >
                    This is a Radio
                </Dropdown.Item>
                ...
            </Dropdown.Group>
        </>
    )}
    >
    ...
</Dropdown>

Props

PropTypeDefaultDescription
iconRight?ComponentType<IconProps>Icon that will be displayed on the right side of the dropdown item
onClick?() => voidAction that gets triggered by clicking the element
childrenReactNodeUsually simple text, but can be anything

On this page