File tree Expand file tree Collapse file tree 3 files changed +25
-1
lines changed
Expand file tree Collapse file tree 3 files changed +25
-1
lines changed Original file line number Diff line number Diff line change 1+ import * as React from "react" ;
2+
3+ import { Meta , StoryFn } from "@storybook/react" ;
4+
5+ import { InProgressDropdown as InProgressDropdownComponent } from "../../view/model-editor/InProgressDropdown" ;
6+
7+ export default {
8+ title : "CodeQL Model Editor/In Progress Dropdown" ,
9+ component : InProgressDropdownComponent ,
10+ } as Meta < typeof InProgressDropdownComponent > ;
11+
12+ const Template : StoryFn < typeof InProgressDropdownComponent > = ( args ) => (
13+ < InProgressDropdownComponent />
14+ ) ;
15+
16+ export const InProgressDropdown = Template . bind ( { } ) ;
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ type Props = {
1919 value : string | undefined ;
2020 options : Array < { value : string ; label : string } > ;
2121 disabled ?: boolean ;
22+ className ?: string ;
2223 disabledPlaceholder ?: string ;
2324 onChange ?: ( event : ChangeEvent < HTMLSelectElement > ) => void ;
2425
@@ -40,6 +41,7 @@ export function Dropdown({
4041 options,
4142 disabled,
4243 disabledPlaceholder,
44+ className,
4345 onChange,
4446 ...props
4547} : Props ) {
@@ -49,6 +51,7 @@ export function Dropdown({
4951 value = { disabled ? disabledValue : value }
5052 disabled = { disabled }
5153 onChange = { onChange }
54+ className = { className }
5255 { ...props }
5356 >
5457 { disabled ? (
Original file line number Diff line number Diff line change 11import * as React from "react" ;
2+ import { styled } from "styled-components" ;
23import { Dropdown } from "../common/Dropdown" ;
34
5+ const StyledDropdown = styled ( Dropdown ) `
6+ font-style: italic;
7+ ` ;
8+
49export const InProgressDropdown = ( ) => {
510 return (
6- < Dropdown
11+ < StyledDropdown
712 value = "Thinking..."
813 options = { [ ] }
914 disabled = { true }
You can’t perform that action at this time.
0 commit comments