-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: hide search control if select no searchable (#6970)
* fix: hide search control if select no searchable
- Loading branch information
Showing
5 changed files
with
142 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
airbyte-webapp/src/components/base/Popout/index.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import React from "react"; | ||
import { ComponentStory, ComponentMeta } from "@storybook/react"; | ||
|
||
import Button from "../Button"; | ||
|
||
import { Popout } from "./Popout"; | ||
|
||
export default { | ||
title: "Ui/Popout", | ||
component: Popout, | ||
} as ComponentMeta<typeof Popout>; | ||
|
||
const Target: React.FC<{ onOpen: () => void; title: string }> = ({ | ||
onOpen, | ||
title, | ||
}) => { | ||
return <Button onClick={() => onOpen()}>{title}</Button>; | ||
}; | ||
|
||
const options = [ | ||
{ | ||
value: 1, | ||
label: "Test 1", | ||
}, | ||
{ | ||
value: 2, | ||
label: "Test 2", | ||
}, | ||
{ | ||
value: 3, | ||
label: "Test 3", | ||
}, | ||
]; | ||
|
||
const Template: ComponentStory<typeof Popout> = (args) => ( | ||
<Popout | ||
{...args} | ||
options={options} | ||
targetComponent={(targetProps) => ( | ||
<Target | ||
onOpen={targetProps.onOpen} | ||
title={`isSearchable: ${args.isSearchable}`} | ||
/> | ||
)} | ||
/> | ||
); | ||
|
||
export const Example = Template.bind({}); | ||
Example.args = { | ||
children: "Text", | ||
title: "Title", | ||
isSearchable: false, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters