-
Notifications
You must be signed in to change notification settings - Fork 616
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '25_1' into update-chrome-v133-25_1
- Loading branch information
Showing
41 changed files
with
177 additions
and
127 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import React from 'react'; | ||
import { Menu, MenuTypes } from 'devextreme-react/menu'; | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
import { menuItems } from './data'; | ||
|
||
const meta: Meta<typeof Menu> = { | ||
title: 'Components/Menu', | ||
component: Menu, | ||
parameters: { | ||
layout: 'fullscreen', | ||
} | ||
}; | ||
|
||
type Story = StoryObj<typeof Menu>; | ||
|
||
const showSubmenuModes= ['onClick', 'onHover'] as const; | ||
const submenuDirectionOptions = ['auto', 'leftOrTop', 'rightOrBottom'] as const; | ||
|
||
const commonArgs: Story['args'] = { | ||
showFirstSubmenuMode: showSubmenuModes[0], | ||
submenuDirection: submenuDirectionOptions[0], | ||
hideSubmenuOnMouseLeave: false, | ||
adaptivityEnabled: false, | ||
}; | ||
|
||
const argTypes = { | ||
showFirstSubmenuMode: { | ||
control: 'select', | ||
options: showSubmenuModes, | ||
}, | ||
submenuDirection: { | ||
control: 'select', | ||
options: submenuDirectionOptions, | ||
}, | ||
hideSubmenuOnMouseLeave: { | ||
control: 'boolean', | ||
}, | ||
adaptivityEnabled: { | ||
control: 'boolean', | ||
}, | ||
}; | ||
|
||
export default meta; | ||
|
||
const createMenuStory = (orientation: MenuTypes.Orientation): Story => ({ | ||
args: { ...commonArgs, orientation }, | ||
argTypes, | ||
render: (args) => <Menu dataSource={menuItems} {...args} />, | ||
}); | ||
|
||
export const Horizontal: Story = createMenuStory('horizontal'); | ||
export const Vertical: Story = createMenuStory('vertical'); |
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,86 @@ | ||
export const menuItems = [{ | ||
id: '1', | ||
text: 'Video Players', | ||
items: [{ | ||
id: '1_1', | ||
text: 'HD Video Player', | ||
price: 220, | ||
icon: 'images/products/1-small.png', | ||
}, { | ||
id: '1_2', | ||
text: 'SuperHD Video Player', | ||
icon: 'images/products/2-small.png', | ||
price: 270, | ||
}], | ||
}, { | ||
id: '2', | ||
text: 'Televisions', | ||
items: [{ | ||
id: '2_1', | ||
text: 'SuperLCD 42', | ||
icon: 'images/products/5-small.png', | ||
price: 1200, | ||
}, { | ||
id: '2_2', | ||
text: 'SuperLED 42', | ||
icon: 'images/products/5-small.png', | ||
price: 1450, | ||
}, { | ||
id: '2_3', | ||
text: 'SuperLED 50', | ||
icon: 'images/products/5-small.png', | ||
price: 1600, | ||
}, { | ||
id: '2_4', | ||
text: 'SuperLCD 55 (Not available)', | ||
icon: 'images/products/5-small.png', | ||
price: 1350, | ||
disabled: true, | ||
}, { | ||
id: '2_5', | ||
text: 'SuperLCD 70', | ||
icon: 'images/products/5-small.png', | ||
price: 4000, | ||
}], | ||
}, { | ||
id: '3', | ||
text: 'Monitors', | ||
items: [{ | ||
id: '3_1', | ||
text: '19"', | ||
items: [{ | ||
id: '3_1_1', | ||
text: 'DesktopLCD 19', | ||
icon: 'images/products/5-small.png', | ||
price: 160, | ||
}], | ||
}, { | ||
id: '3_2', | ||
text: '21"', | ||
items: [{ | ||
id: '3_2_1', | ||
text: 'DesktopLCD 21', | ||
icon: 'images/products/5-small.png', | ||
price: 170, | ||
}, { | ||
id: '3_2_2', | ||
text: 'DesktopLED 21', | ||
icon: 'images/products/5-small.png', | ||
price: 175, | ||
}], | ||
}], | ||
}, { | ||
id: '4', | ||
text: 'Projectors', | ||
items: [{ | ||
id: '4_1', | ||
text: 'Projector Plus', | ||
icon: 'images/products/5-small.png', | ||
price: 550, | ||
}, { | ||
id: '4_2', | ||
text: 'Projector PlusHD', | ||
icon: 'images/products/5-small.png', | ||
price: 750, | ||
}], | ||
}]; |
Binary file modified
BIN
+11 Bytes
(100%)
...u/etalons/Delimiter appearance, orientation is vertical (fluent-blue-light).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 modified
BIN
-176 Bytes
(98%)
...etalons/Delimiter appearance, orientation is vertical (material-blue-light).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 modified
BIN
-7 Bytes
(100%)
...r appearance, orientation is vertical, bottom collision (fluent-blue-light).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 modified
BIN
-288 Bytes
(97%)
...appearance, orientation is vertical, bottom collision (material-blue-light).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 modified
BIN
-4 Bytes
(100%)
...arance, orientation is vertical, bottom right collision (fluent-blue-light).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 modified
BIN
-127 Bytes
(99%)
...ance, orientation is vertical, bottom right collision (material-blue-light).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 modified
BIN
-1 Byte
(100%)
...er appearance, orientation is vertical, right collision (fluent-blue-light).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 modified
BIN
-151 Bytes
(99%)
... appearance, orientation is vertical, right collision (material-blue-light).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
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
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
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
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
Oops, something went wrong.