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(data-table): remove inline edit short table styles #8212

Merged
Show file tree
Hide file tree
Changes from 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,19 @@
}
}

// Form Control Overrides
.#{$prefix}--list-box input[role='combobox'],
.#{$prefix}--list-box input[type='text'],
.#{$prefix}--dropdown,
.#{$prefix}--list-box,
.#{$prefix}--number input[type='number'],
.#{$prefix}--number__control-btn::before,
.#{$prefix}--number__control-btn::after,
.#{$prefix}--text-input,
.#{$prefix}--select-input {
background-color: $field-02;
}

// Overflow Menu Overrides
.#{$prefix}--data-table
td.#{$prefix}--table-column-menu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,4 @@
padding-left: $spacing-04;
}
}

.#{$prefix}--data-table--short {
input {
height: rem(32px);
}

select {
padding: 0.45rem 2.75rem 0.45rem $spacing-05;
}

.#{$prefix}--select__arrow {
top: 0.875rem;
}
}
}
42 changes: 42 additions & 0 deletions packages/react/src/components/DataTable/stories/shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import React from 'react';
import { action } from '@storybook/addon-actions';
import Link from '../../Link';
import Select from '../../Select';
import SelectItem from '../../SelectItem';

export const rows = [
{
Expand All @@ -17,6 +19,12 @@ export const rows = [
rule: 'Round robin',
attached_groups: 'Kevin’s VM Groups',
status: <Link>Disabled</Link>,
foo: (
<Select id="bar" noLabel size="sm">
<SelectItem value={1} text="1" />
<SelectItem value={2} text="2" />
</Select>
),
},
{
id: 'b',
Expand All @@ -26,6 +34,12 @@ export const rows = [
rule: 'Round robin',
attached_groups: 'Maureen’s VM Groups',
status: <Link>Starting</Link>,
foo: (
<Select id="bar" noLabel size="sm">
<SelectItem value={1} text="1" />
<SelectItem value={2} text="2" />
</Select>
),
},
{
id: 'c',
Expand All @@ -35,6 +49,12 @@ export const rows = [
rule: 'DNS delegation',
attached_groups: 'Andrew’s VM Groups',
status: <Link>Active</Link>,
foo: (
<Select id="bar" noLabel size="sm">
<SelectItem value={1} text="1" />
<SelectItem value={2} text="2" />
</Select>
),
},
{
id: 'd',
Expand All @@ -44,6 +64,12 @@ export const rows = [
rule: 'Round robin',
attached_groups: 'Marc’s VM Groups',
status: <Link>Disabled</Link>,
foo: (
<Select id="bar" noLabel size="sm">
<SelectItem value={1} text="1" />
<SelectItem value={2} text="2" />
</Select>
),
},
{
id: 'e',
Expand All @@ -53,6 +79,12 @@ export const rows = [
rule: 'Round robin',
attached_groups: 'Mel’s VM Groups',
status: <Link>Starting</Link>,
foo: (
<Select id="bar" noLabel size="sm">
<SelectItem value={1} text="1" />
<SelectItem value={2} text="2" />
</Select>
),
},
{
id: 'f',
Expand All @@ -62,6 +94,12 @@ export const rows = [
rule: 'DNS delegation',
attached_groups: 'Ronja’s VM Groups',
status: <Link>Active</Link>,
foo: (
<Select id="bar" noLabel size="sm">
<SelectItem value={1} text="1" />
<SelectItem value={2} text="2" />
</Select>
),
},
];

Expand Down Expand Up @@ -90,6 +128,10 @@ export const headers = [
key: 'status',
header: 'Status',
},
{
key: 'foo',
header: 'foo',
},
];

export const batchActionClick = (selectedRows) => () =>
Expand Down