Skip to content

Commit

Permalink
Endrer ordlyd på flere knapper
Browse files Browse the repository at this point in the history
  • Loading branch information
chrhein committed Oct 22, 2024
1 parent 616dcf6 commit fe36f28
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const meta: Meta<typeof KvibPopover> = {
description: "The padding required to prevent the arrow from reaching the very edge of the Popover.",
table: {
type: { summary: "number" },
defaultValue: { summary: 8 },
defaultValue: { summary: "8" },
},
control: "number",
},
Expand All @@ -65,7 +65,7 @@ const meta: Meta<typeof KvibPopover> = {
description: "If true, focus will be transferred to the first interactive element when the popover opens",
table: {
type: { summary: "boolean" },
defaultValue: { summary: true },
defaultValue: { summary: "true" },
},
control: "boolean",
},
Expand All @@ -82,7 +82,7 @@ const meta: Meta<typeof KvibPopover> = {
description: "",
table: {
type: { summary: "number" },
defaultValue: { summary: 200 },
defaultValue: { summary: "200" },
},
control: "number",
},
Expand All @@ -91,7 +91,7 @@ const meta: Meta<typeof KvibPopover> = {
description: "If true, the popover will close when you blur out it by clicking outside or tabbing out",
table: {
type: { summary: "boolean" },
defaultValue: { summary: true },
defaultValue: { summary: "true" },
},
control: "boolean",
},
Expand All @@ -100,7 +100,7 @@ const meta: Meta<typeof KvibPopover> = {
description: "If true, the popover will close when you hit the Esc key",
table: {
type: { summary: "boolean" },
defaultValue: { summary: true },
defaultValue: { summary: "true" },
},
control: "boolean",
},
Expand Down Expand Up @@ -137,7 +137,7 @@ const meta: Meta<typeof KvibPopover> = {
"If provided, determines whether the Popover will reposition itself on scroll and resize of the window.",
table: {
type: { summary: "boolean | { scroll?: boolean | undefined resize?: boolean | undefined }" },
defaultValue: { summary: true },
defaultValue: { summary: "true" },
},
control: "object",
},
Expand All @@ -147,7 +147,7 @@ const meta: Meta<typeof KvibPopover> = {
"If true, the Popover will change its placement and flip when it's about to overflow its boundary area.",
table: {
type: { summary: "boolean" },
defaultValue: { summary: true },
defaultValue: { summary: "true" },
},
control: "boolean",
},
Expand All @@ -157,7 +157,7 @@ const meta: Meta<typeof KvibPopover> = {
"The distance or margin between the reference and Popover. It is used internally to create an offset modifier. NB: If you define offset prop, it'll override the gutter.",
table: {
type: { summary: "number" },
defaultValue: { summary: 8 },
defaultValue: { summary: "8" },
},
control: "number",
},
Expand Down Expand Up @@ -210,7 +210,7 @@ const meta: Meta<typeof KvibPopover> = {
"If true, the Popover will match the width of the reference at all times. It's useful for autocomplete, `date-picker` and select patterns.",
table: {
type: { summary: "boolean" },
defaultValue: { summary: false },
defaultValue: { summary: "false" },
},
control: "boolean",
},
Expand All @@ -220,38 +220,34 @@ const meta: Meta<typeof KvibPopover> = {
table: {
type: { summary: "Partial<Modifier<string, any>>[]" },
},
control: "array",
},

offset: {
description: "The main and cross-axis offset to displace Popover element from its reference element.",
table: {
type: { summary: "[number, number]" },
},
control: "array",
},

onClose: {
description: "Callback fired when the popover closes",
table: {
type: { summary: "() => void" },
},
control: "function",
},

onOpen: {
description: "Callback fired when the popover opens",
table: {
type: { summary: "() => void" },
},
control: "function",
},

openDelay: {
description: "",
table: {
type: { summary: "number" },
defaultValue: { summary: 200 },
defaultValue: { summary: "200" },
},
control: "number",
},
Expand All @@ -270,7 +266,7 @@ const meta: Meta<typeof KvibPopover> = {
"If true, will prevent the popover from being cut off and ensure it's visible within the boundary area.",
table: {
type: { summary: "boolean" },
defaultValue: { summary: true },
defaultValue: { summary: "true" },
},
control: "boolean",
},
Expand All @@ -279,7 +275,7 @@ const meta: Meta<typeof KvibPopover> = {
description: "If true, focus will be returned to the element that triggers the popover when it closes",
table: {
type: { summary: "boolean" },
defaultValue: { summary: true },
defaultValue: { summary: "true" },
},
control: "boolean",
},
Expand Down Expand Up @@ -319,13 +315,12 @@ export const Preview: Story = {
render: args => (
<KvibPopover {...args}>
<PopoverTrigger>
<Button>Trykk</Button>
<Button>Vis popover</Button>
</PopoverTrigger>
<PopoverContent>
<PopoverArrow />
<PopoverCloseButton />
<PopoverHeader>Bekreftelse!</PopoverHeader>
<PopoverBody>Er du sikker på at du vil drikke den milkshaken?</PopoverBody>
<PopoverHeader>Dette er en popover</PopoverHeader>
</PopoverContent>
</KvibPopover>
),
Expand Down Expand Up @@ -465,7 +460,7 @@ const ControlledUsage = ({ ...args }) => {
<PopoverBody>Er du sikker på at du vil fortsette?</PopoverBody>
<PopoverFooter display="flex" justifyContent="flex-end">
<ButtonGroup size="sm">
<Button variant="outline">Avbryt</Button>
<Button variant="tertiary">Avbryt</Button>
<Button colorScheme="red">Godkjenn</Button>
</ButtonGroup>
</PopoverFooter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const meta: Meta<KvibToast> = {
description: "Time for the toast to disappear, in milliseconds. Set to null for infinite",
table: {
type: { summary: "number" },
defaultValue: { summary: 9000 },
defaultValue: { summary: "9000" },
},
control: { type: "number" },
},
Expand All @@ -62,7 +62,7 @@ const meta: Meta<KvibToast> = {
description: "if true, the toast will show a close button",
table: {
type: { summary: "boolean" },
defaultValue: { summary: false },
defaultValue: { summary: "false" },
},
control: "boolean",
},
Expand All @@ -78,7 +78,6 @@ const meta: Meta<KvibToast> = {
table: {
type: { summary: "() => void" },
},
control: "",
},
position: {
description: "Placement of the toast",
Expand Down Expand Up @@ -136,7 +135,7 @@ const ToastExample = ({ ...args }) => {
})
}
>
{args.title}
Vis toast
</Button>
</Center>
);
Expand Down

0 comments on commit fe36f28

Please sign in to comment.