Skip to content

Commit

Permalink
Fix Dropdown component export and types
Browse files Browse the repository at this point in the history
  • Loading branch information
iacopolea committed Apr 19, 2024
1 parent 49cf611 commit ce879bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/stories/Dropdown/Dropdown.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { Meta, StoryFn } from "@storybook/react";
import Dropdown, { DropdownProps } from ".";
import { Dropdown } from ".";
import { colourOptions } from "./data";

export default {
title: "Dropdown",
component: Dropdown,
} as Meta;

const Template: StoryFn<DropdownProps> = (args) => {
const Template: StoryFn = (args) => {
return <Dropdown {...args} />;
};

Expand Down
8 changes: 2 additions & 6 deletions src/stories/Dropdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ import ReactSelect, { Props, GroupBase, StylesConfig } from "react-select5";
import { aqTheme, customComponents } from "./styles";
import { aqBootstrapTheme } from "../theme/defaultTheme";

export interface DropdownProps extends Props {}

function Dropdown<
export function Dropdown<
Option,
IsMulti extends boolean = false,
Group extends GroupBase<Option> = GroupBase<Option>,
>(props: Props<Option, IsMulti, Group>) {
>(props: Props<Option, IsMulti, Group>): React.ReactNode {
const customStyle: StylesConfig<Option, IsMulti, Group> = {
control: (provided, state) => {
let borderColor = aqBootstrapTheme.colors.elementGeneric;
Expand Down Expand Up @@ -215,5 +213,3 @@ function Dropdown<
/>
);
}

export default Dropdown;

0 comments on commit ce879bb

Please sign in to comment.