Skip to content
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

fix(styles): menu command with & without icons aren't aligned #1180

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/vite-demo-vanilla-bundle/src/examples/example01.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default class Example1 {
{ command: '', divider: true, positionOrder: 98 },
{
// we can also have multiple nested sub-menus
command: 'export', title: 'Exports', positionOrder: 99,
command: 'export', title: 'Exports', iconCssClass: 'mdi mdi-download', positionOrder: 99,
commandItems: [
{ command: 'exports-txt', title: 'Text (tab delimited)' },
{
Expand All @@ -92,7 +92,7 @@ export default class Example1 {
]
},
{
command: 'feedback', title: 'Feedback', positionOrder: 100,
command: 'feedback', title: 'Feedback', iconCssClass: 'mdi mdi-information-outline', positionOrder: 100,
commandItems: [
{ command: 'request-update', title: 'Request update from supplier', iconCssClass: 'mdi mdi-star', tooltip: 'this will automatically send an alert to the shipping team to contact the user for an update' },
'divider',
Expand Down
4 changes: 2 additions & 2 deletions examples/vite-demo-vanilla-bundle/src/examples/example04.ts
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ export default class Example4 {
{ command: '', divider: true, positionOrder: 98 },
{
// we can also have multiple nested sub-menus
command: 'export', title: 'Exports', positionOrder: 99,
command: 'export', title: 'Exports', iconCssClass: 'mdi mdi-download', positionOrder: 99,
commandItems: [
{ command: 'exports-txt', title: 'Text (tab delimited)' },
{
Expand All @@ -445,7 +445,7 @@ export default class Example4 {
]
},
{
command: 'feedback', title: 'Feedback', positionOrder: 100,
command: 'feedback', title: 'Feedback', iconCssClass: 'mdi mdi-information-outline', positionOrder: 100,
commandItems: [
{ command: 'request-update', title: 'Request update from supplier', iconCssClass: 'mdi mdi-star', tooltip: 'this will automatically send an alert to the shipping team to contact the user for an update' },
'divider',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export default class Example7 {
{ command: '', divider: true, positionOrder: 98 },
{
// we can also have multiple nested sub-menus
command: 'export', title: 'Exports', positionOrder: 99,
command: 'export', title: 'Exports', iconCssClass: 'mdi mdi-download', positionOrder: 99,
commandItems: [
{ command: 'exports-txt', title: 'Text (tab delimited)' },
{
Expand Down
1 change: 1 addition & 0 deletions packages/common/src/styles/_variables-theme-material.scss
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ $slick-column-picker-title-font-size: 17px !default;
$slick-menu-item-font-size: 14px !default;
$slick-menu-item-height: 26px !default;
$slick-menu-icon-line-height: 18px !default;
$slick-menu-icon-min-width: 18px !default;
$slick-menu-icon-width: 18px !default;
$slick-menu-title-font-size: 17px !default;
$slick-icon-group-width: 22px !default;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ $slick-column-picker-title-font-size: 17px !default;
$slick-menu-item-font-size: 14px !default;
$slick-menu-item-height: 26px !default;
$slick-menu-icon-line-height: 18px !default;
$slick-menu-icon-min-width: 18px !default;
$slick-menu-icon-width: 18px !default;
$slick-menu-title-font-size: 17px !default;
$slick-icon-group-color: $slick-primary-color !default;
Expand Down
1 change: 1 addition & 0 deletions packages/common/src/styles/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,7 @@ $slick-menu-icon-font-size: $slick-icon-font-siz
$slick-menu-icon-line-height: calc(#{$slick-menu-icon-font-size} + 2px) !default;
$slick-menu-item-width-when-button: calc(100% - #{$slick-menu-close-btn-width}) !default;
$slick-menu-icon-margin-right: 4px !default;
$slick-menu-icon-min-width: 16px !default;
$slick-menu-icon-width: 16px !default;
$slick-menu-line-height: 24px !default;
$slick-menu-min-width: 140px !default;
Expand Down
1 change: 1 addition & 0 deletions packages/common/src/styles/slick-plugins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ li.hidden {
line-height: var(--slick-menu-icon-line-height, $slick-menu-icon-line-height);
margin-right: var(--slick-menu-icon-margin-right, $slick-menu-icon-margin-right);
vertical-align: middle;
min-width: var(--slick-menu-icon-min-width, $slick-menu-icon-min-width);
width: var(--slick-menu-icon-width, $slick-menu-icon-width);
}

Expand Down