-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(SearchBox): Add Search Box #863
Merged
Merged
Changes from 101 commits
Commits
Show all changes
138 commits
Select commit
Hold shift + click to select a range
95cb070
Base search box
gretanausedaite 8929ed4
Merge branch 'main' into greta/search-box
gretanausedaite 882f11d
Merge branch 'main' into greta/search-box
gretanausedaite 8a49012
Testing new class
gretanausedaite c07b993
testing flex container
gretanausedaite 6b283fa
add message - will delete later
gretanausedaite 7f745b5
moving around to pass build
gretanausedaite c9af329
add disabled
gretanausedaite 7c69749
Move utils mixins to utils
gretanausedaite 2be98ef
testing components
gretanausedaite ffcf724
Merge remote-tracking branch 'origin/main' into greta/search-box
gretanausedaite 1231d61
Add react component
gretanausedaite df4353c
testing
gretanausedaite 9961fae
Merge branch 'main' into greta/search-box
gretanausedaite 26d761a
Added props to start and end adornments
gretanausedaite 568eca4
testing sized and status
gretanausedaite d3f3290
Merge branch 'main' into greta/search-box
gretanausedaite 82a12cf
Merge branch 'main' into greta/search-box
gretanausedaite c7f88e2
Merge branch 'main' into greta/search-box
gretanausedaite d8970f5
Merge branch 'main' into greta/search-box
gretanausedaite b1ac9aa
Added Icon support.
gretanausedaite 78ff398
CSS tests
gretanausedaite be20c44
Basic searchbox tests
gretanausedaite 3851578
Merge branch 'main' into greta/search-box
gretanausedaite a40919a
some adjustments
gretanausedaite d9473d1
Update ids
gretanausedaite 47e1587
Merge branch 'main' into greta/search-box
gretanausedaite bb69962
Add changeset files
gretanausedaite 0ddd014
Trying animations
gretanausedaite 57e3d3f
Searchbox styles
gretanausedaite ed60055
Testing expandable
gretanausedaite fa4d346
Merge branch 'main' into greta/search-box
gretanausedaite 861efb1
Merge branch 'main' into greta/search-box
gretanausedaite 7dd3b01
Merge branch 'main' into greta/search-box
gretanausedaite a75587c
Merge branch 'main' into greta/search-box
gretanausedaite 76f502e
Animation added
gretanausedaite 3e988f7
Merge branch 'main' into greta/search-box
gretanausedaite 686d32d
Merge branch 'main' into greta/search-box
gretanausedaite 5c8bad7
Add some storybook tests
gretanausedaite 9ba39b6
Vertical divider and tests
gretanausedaite d5c4d71
Merge branch 'main' into greta/search-box
gretanausedaite 31ee322
Not export flex container
gretanausedaite 4e77b47
lost image
gretanausedaite cf19cd7
Merge branch 'main' into greta/search-box
gretanausedaite 3e4e7ee
Trying to fix css
gretanausedaite 883e8a4
hiding buttons
gretanausedaite 89ae98d
Merge branch 'main' into greta/search-box
gretanausedaite 23b1451
Reorder stories and playing with toggle
gretanausedaite 4e15305
Merge branch 'main' into greta/search-box
gretanausedaite 45468bb
Merge branch 'main' into greta/search-box
gretanausedaite ea9f14b
Merge branch 'main' into greta/search-box
gretanausedaite 14ac6a8
Merge branch 'main' into greta/search-box
gretanausedaite 811bee0
rework
gretanausedaite 3dbc629
Merge branch 'main' into greta/search-box
gretanausedaite eebf884
focus styles
gretanausedaite ecc74d0
Merge branch 'main' into greta/search-box
gretanausedaite 9c9547d
Add status and disabled state
gretanausedaite 3e4dd33
Merge branch 'main' into greta/search-box
gretanausedaite d781be5
Trying to make it work
gretanausedaite 16b0f10
Merge branch 'main' into greta/search-box
gretanausedaite 7d7f8cf
Trying to make expandable search more intuitive
gretanausedaite 5950b20
Merge branch 'main' into greta/search-box
gretanausedaite af21292
Trying to make it work
gretanausedaite 59baa9d
Seachbox component
gretanausedaite 0acb3a9
CSS and poly fix
gretanausedaite e8eb10f
Merge branch 'main' into greta/search-box
gretanausedaite bd95812
searchbox-comment solve
gretanausedaite cb2fc4e
Cleanup playground
gretanausedaite fb608a9
Almost working - need ux input
gretanausedaite ef5e0db
Visual test updates
gretanausedaite 440d683
Merge branch 'main' into greta/search-box
gretanausedaite 7aef676
Removing type search and status classnames
gretanausedaite 2560879
Merge branch 'main' into greta/search-box
gretanausedaite 9d66121
Manage disabled state
gretanausedaite e81b1b3
Removing focus within functionality
gretanausedaite 977628a
Remove focus at all
gretanausedaite fce7c08
Merge branch 'main' into greta/search-box
gretanausedaite df23f24
more fluid animation
gretanausedaite 6f46336
images update
gretanausedaite 11bb937
Adding bit of tests
gretanausedaite 43dd40b
Merge branch 'main' into greta/search-box
gretanausedaite b37235a
Update changesets
gretanausedaite e46b7b6
clean images
gretanausedaite 2ef1f84
Merge branch 'main' into greta/search-box
gretanausedaite d2026a2
Collapsed state focus fix?
gretanausedaite 1708bfd
image update
gretanausedaite 03947c5
css disabled fix
gretanausedaite 09469a0
Undo disabled tests
gretanausedaite fa5276d
update react images
gretanausedaite 79d2c6a
Merge branch 'main' into greta/search-box
gretanausedaite 4ec1b39
Rename disabled to isDisabled
gretanausedaite 7dbd3f4
Status border fix
gretanausedaite 8dce1dc
Add docs page
gretanausedaite ea019a4
Some comments solving
gretanausedaite 529a120
Stories update
gretanausedaite 1627c28
Merge branch 'main' into greta/search-box
gretanausedaite 7447493
Tests fix
gretanausedaite d5f43b5
Merge branch 'main' into greta/search-box
gretanausedaite 59288c5
Expand/collapse rename
gretanausedaite 5daa300
Merge branch 'main' into greta/search-box
gretanausedaite 4ec3f85
Removed size prop extract and comments
gretanausedaite b943575
Merge branch 'main' into greta/search-box
gretanausedaite 35bbdae
UID to useEffect
gretanausedaite ac90702
Update animation speed
gretanausedaite fc54211
Linter fix
gretanausedaite aee70e3
Merge branch 'main' into greta/search-box
gretanausedaite e8b6fa2
Co-authored-by: Mayank <[email protected]>
gretanausedaite dfec34a
Added comments
gretanausedaite ce247e9
Remove docs page - will work on that next time
gretanausedaite c9fcca8
React unit tests
gretanausedaite bf04c98
Storybook update
gretanausedaite c909192
Css update
gretanausedaite 64aab6f
Storybook update
gretanausedaite 1814968
Add aria-label to searchbox container?
gretanausedaite 9454fb2
Fix changeset
gretanausedaite dc84257
css changeset update
gretanausedaite 13d7d15
Remove type from args
gretanausedaite f25aa62
Added code comments in css
gretanausedaite 465734c
Update conditions
gretanausedaite f6dee6d
Undo aria-label
gretanausedaite 672d524
Removed comments that was unuseful
gretanausedaite 7af9688
Merge branch 'main' into greta/search-box
gretanausedaite 7fa02ac
Moving files around after merge
gretanausedaite 0e76826
update icon css a bit
gretanausedaite e5a17fe
change icon margin and switch position
gretanausedaite 8be14a9
Merge branch 'main' into greta/search-box
gretanausedaite dda7e13
Fixed import and modified previous changeset
gretanausedaite 1890bbf
Merge branch 'main' into greta/search-box
gretanausedaite 27a5eee
Icon margin update
gretanausedaite aa166d7
aesthetic changes
mayank99 147b049
non-aesthetic changes
mayank99 955dd6f
oopsie
mayank99 18e7ddc
update images
mayank99 987fe64
setInputId comment
gretanausedaite 6fcb109
Rename var to margin
gretanausedaite 4e9c5e1
Add new class and fix margin
gretanausedaite 35d819c
Merge branch 'main' into greta/search-box
gretanausedaite af08a63
Merge branch 'main' into greta/search-box
gretanausedaite File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
'@itwin/itwinui-react': minor | ||
--- | ||
|
||
Add `SearchBox` component for your search needs. It can be used as static or expandable search. | ||
|
||
```ts | ||
<SearchBox inputProps={{placeholder:'Basic search'}} /> | ||
<SearchBox expandable inputProps={{placeholder:'Expandable search'}} /> | ||
``` | ||
|
||
`SearchBox` has subcomponents which can be passed as children to customise the look. | ||
|
||
`SearchBox.Icon` - Icon to use within searchbox. By default it has looking glass svg. | ||
`SearchBox.Button` - Icon button to use within searchbox. By default it has looking glass svg as content. | ||
`SearchBox.Input` - Input component to use within searchbox. | ||
`SearchBox.CloseButton` - Button that will close searchbox when expanded. | ||
`SearchBox.OpenButton` - Button that will expand searchbox when collapsed. | ||
|
||
```ts | ||
<SearchBox> | ||
<SearchBox.Button title='Search button' /> | ||
<SearchBox.Input placeholder='Basic search with custom interactions' /> | ||
<Text | ||
isMuted | ||
variant='body' | ||
as='p' | ||
style={{ paddingRight: 'var(--iui-size-s)', alignSelf: 'center' }} | ||
> | ||
0/3 | ||
</Text> | ||
<Divider orientation='vertical' /> | ||
<SearchBox.Button styleType='borderless'> | ||
<SvgCaretUpSmall /> | ||
</SearchBox.Button> | ||
<SearchBox.Button styleType='borderless'> | ||
<SvgCaretDownSmall /> | ||
</SearchBox.Button> | ||
</SearchBox> | ||
``` |
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,8 @@ | ||
--- | ||
'@itwin/itwinui-css': minor | ||
--- | ||
|
||
- Add `iui-input-flex-container` class for inputs with icons and buttons within | ||
- Add `iui-expandable-searchbox` class for Searchbox that can be expanded | ||
- Add `iui-search-icon` for styling icons within search | ||
- Additional styling for buttons and input is not needed |
Binary file added
BIN
+10.9 KB
...press-visual-screenshots/baseline/SearchBox.test.ts-Basic With Custom Items.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.07 KB
apps/storybook/cypress-visual-screenshots/baseline/SearchBox.test.ts-Basic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.12 KB
...ook/cypress-visual-screenshots/baseline/SearchBox.test.ts-Expandable (Open).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+11.2 KB
...-screenshots/baseline/SearchBox.test.ts-Expandable With Custom Items (Open).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.12 KB
...-visual-screenshots/baseline/SearchBox.test.ts-Expandable With Custom Items.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.12 KB
.../storybook/cypress-visual-screenshots/baseline/SearchBox.test.ts-Expandable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.18 KB
apps/storybook/cypress-visual-screenshots/baseline/SearchBox.test.ts-Small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.03 KB
...ess-visual-screenshots/baseline/SearchBox.test.ts-With Custom Action (Open).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+5.12 KB
...ok/cypress-visual-screenshots/baseline/SearchBox.test.ts-With Custom Action.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,109 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
import { Meta, StoryFn } from '@storybook/react'; | ||
import { action } from '@storybook/addon-actions'; | ||
import React from 'react'; | ||
import { | ||
SearchBox, | ||
SearchBoxProps, | ||
IconButton, | ||
Text, | ||
Divider, | ||
} from '@itwin/itwinui-react'; | ||
import { SvgCaretDownSmall, SvgCaretUpSmall } from '@itwin/itwinui-icons-react'; | ||
|
||
export default { | ||
component: SearchBox, | ||
argTypes: { | ||
className: { control: { disable: true } }, | ||
style: { control: { disable: true } }, | ||
}, | ||
title: 'Input/SearchBox', | ||
} as Meta<SearchBoxProps>; | ||
|
||
export const Basic: StoryFn<SearchBoxProps> = () => { | ||
return <SearchBox inputProps={{ placeholder: 'Basic search' }} />; | ||
}; | ||
|
||
export const BasicWithCustomItems: StoryFn<SearchBoxProps> = () => { | ||
return ( | ||
<SearchBox> | ||
<SearchBox.Button title='Search button' /> | ||
<SearchBox.Input placeholder='Basic search with custom interactions' /> | ||
<Text | ||
isMuted | ||
variant='body' | ||
as='p' | ||
style={{ paddingRight: 'var(--iui-size-s)', alignSelf: 'center' }} | ||
> | ||
0/3 | ||
</Text> | ||
<Divider orientation='vertical' /> | ||
<SearchBox.Button styleType='borderless'> | ||
<SvgCaretUpSmall /> | ||
</SearchBox.Button> | ||
<SearchBox.Button styleType='borderless'> | ||
<SvgCaretDownSmall /> | ||
</SearchBox.Button> | ||
</SearchBox> | ||
); | ||
}; | ||
|
||
export const Expandable: StoryFn<SearchBoxProps> = () => { | ||
return <SearchBox expandable id='search-input' />; | ||
}; | ||
|
||
export const ExpandableWithCustomItems: StoryFn<SearchBoxProps> = () => { | ||
return ( | ||
<SearchBox expandable> | ||
<SearchBox.Input placeholder='Expandable search with custom interactions' /> | ||
<SearchBox.Button> | ||
<SvgCaretUpSmall /> | ||
</SearchBox.Button> | ||
<SearchBox.Button> | ||
<SvgCaretDownSmall /> | ||
</SearchBox.Button> | ||
<Divider orientation='vertical' /> | ||
<SearchBox.CollapseButton /> | ||
</SearchBox> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The composition looks nice in use : ) |
||
); | ||
}; | ||
|
||
export const Small: StoryFn<SearchBoxProps> = () => { | ||
return <SearchBox size='small' inputProps={{ placeholder: 'Search...' }} />; | ||
}; | ||
|
||
export const WithCustomAction: StoryFn<SearchBoxProps> = () => { | ||
const [expanded, setExpanded] = React.useState(false); | ||
|
||
const handleExpand = () => { | ||
action('Expanding searchbox'); | ||
setExpanded(true); | ||
}; | ||
|
||
const handleCollapse = () => { | ||
action('Collapsing searchbox'); | ||
setExpanded(false); | ||
}; | ||
|
||
return ( | ||
<SearchBox | ||
expandable | ||
isExpanded={expanded} | ||
onExpand={handleExpand} | ||
onCollapse={handleCollapse} | ||
> | ||
<SearchBox.Input placeholder='Test' /> | ||
<SearchBox.CollapseButton /> | ||
<Divider orientation='vertical' /> | ||
<IconButton styleType='borderless'> | ||
<SvgCaretUpSmall /> | ||
</IconButton> | ||
<IconButton styleType='borderless'> | ||
<SvgCaretDownSmall /> | ||
</IconButton> | ||
</SearchBox> | ||
); | ||
}; |
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,27 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
describe('SearchBox', () => { | ||
const storyPath = 'Input/SearchBox'; | ||
const tests = [ | ||
'Basic', | ||
'Basic With Custom Items', | ||
'Expandable', | ||
'Expandable With Custom Items', | ||
'With Custom Action', | ||
'Small', | ||
]; | ||
|
||
tests.forEach((testName) => { | ||
it(testName, function () { | ||
const id = Cypress.storyId(storyPath, testName); | ||
cy.visit('iframe', { qs: { id } }); | ||
cy.compareSnapshot(testName); | ||
if (!testName.includes('Basic') && testName !== 'Small') { | ||
cy.get('.iui-searchbox-open-button').first().click(); | ||
cy.compareSnapshot(`${testName} (Open)`); | ||
} | ||
}); | ||
}); | ||
}); |
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,46 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
import * as React from 'react'; | ||
import { SearchBox, Text, Divider, Flex } from '@itwin/itwinui-react'; | ||
import { SvgCaretUpSmall, SvgCaretDownSmall, SvgCloseSmall } from '@itwin/itwinui-icons-react'; | ||
|
||
export default () => { | ||
return ( | ||
<Flex style={{ width: '70%' }} justifyContent='center' flexDirection='column'> | ||
<SearchBox expandable> | ||
<SearchBox.Input placeholder='Expandable search with custom interactions' /> | ||
<SearchBox.Button label='Previous result'> | ||
<SvgCaretUpSmall /> | ||
</SearchBox.Button> | ||
<SearchBox.Button label='Next result'> | ||
<SvgCaretDownSmall /> | ||
</SearchBox.Button> | ||
<Divider orientation='vertical' /> | ||
<SearchBox.CollapseButton label='Close search' /> | ||
</SearchBox> | ||
<SearchBox> | ||
<SearchBox.Input placeholder='Basic search with custom interactions' /> | ||
<Text | ||
isMuted | ||
variant='body' | ||
as='p' | ||
style={{ paddingRight: 'var(--iui-size-s)', alignSelf: 'center' }} | ||
> | ||
0/3 | ||
</Text> | ||
<Divider orientation='vertical' /> | ||
<SearchBox.Button label='Previous result'> | ||
<SvgCaretUpSmall /> | ||
</SearchBox.Button> | ||
<SearchBox.Button label='Next result'> | ||
<SvgCaretDownSmall /> | ||
</SearchBox.Button> | ||
<SearchBox.Button label='Clear search'> | ||
<SvgCloseSmall /> | ||
</SearchBox.Button> | ||
</SearchBox> | ||
</Flex> | ||
); | ||
}; |
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,32 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
import * as React from 'react'; | ||
import { SearchBox, Divider, Flex } from '@itwin/itwinui-react'; | ||
import { SvgCaretUpSmall, SvgCaretDownSmall, SvgAirplane } from '@itwin/itwinui-icons-react'; | ||
|
||
export default () => { | ||
return ( | ||
<Flex style={{ width: '70%' }} justifyContent='center' flexDirection='column'> | ||
<SearchBox | ||
expandable | ||
collapsedState={ | ||
<SearchBox.ExpandButton> | ||
<SvgAirplane /> | ||
</SearchBox.ExpandButton> | ||
} | ||
> | ||
<SearchBox.Input placeholder='Expandable search with custom open icon' /> | ||
<SearchBox.Button label='Previous result'> | ||
<SvgCaretUpSmall /> | ||
</SearchBox.Button> | ||
<SearchBox.Button label='Next result'> | ||
<SvgCaretDownSmall /> | ||
</SearchBox.Button> | ||
<Divider orientation='vertical' /> | ||
<SearchBox.CollapseButton label='Close search' /> | ||
</SearchBox> | ||
</Flex> | ||
); | ||
}; |
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,18 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
import * as React from 'react'; | ||
import { SearchBox, Flex } from '@itwin/itwinui-react'; | ||
|
||
export default () => { | ||
return ( | ||
<Flex style={{ width: '70%' }} justifyContent='center'> | ||
<SearchBox | ||
expandable | ||
aria-label='Search input' | ||
inputProps={{ placeholder: 'Expandable search...' }} | ||
/> | ||
</Flex> | ||
); | ||
}; |
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,14 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
import * as React from 'react'; | ||
import { SearchBox, Flex } from '@itwin/itwinui-react'; | ||
|
||
export default () => { | ||
return ( | ||
<Flex style={{ width: '70%' }}> | ||
<SearchBox aria-label='Search input' inputProps={{ placeholder: 'Search...' }} /> | ||
</Flex> | ||
); | ||
}; |
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,15 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
import * as React from 'react'; | ||
import { SearchBox, Flex } from '@itwin/itwinui-react'; | ||
|
||
export default () => { | ||
return ( | ||
<Flex style={{ width: '70%' }} flexDirection='column'> | ||
<SearchBox size='small' inputProps={{ placeholder: 'Small search...' }} /> | ||
<SearchBox size='large' inputProps={{ placeholder: 'Large search...' }} /> | ||
</Flex> | ||
); | ||
}; |
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,16 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
import * as React from 'react'; | ||
import { SearchBox, Flex } from '@itwin/itwinui-react'; | ||
|
||
export default () => { | ||
return ( | ||
<Flex style={{ width: '70%' }} flexDirection='column'> | ||
<SearchBox status='positive' inputProps={{ placeholder: 'Positive search...' }} /> | ||
<SearchBox status='warning' inputProps={{ placeholder: 'Warning search...' }} /> | ||
<SearchBox status='negative' inputProps={{ placeholder: 'Negative search...' }} /> | ||
</Flex> | ||
); | ||
}; |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing: jsdocs, changesets, documentation page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added jsdocs, changeset, will work on docs page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
current changeset is too much 😅 it needs to be concise enough to not take more than a few lines
i think the composition example can be removed, and the descriptions for all the subcomponents can also be removed