Skip to content

Commit cd81ad3

Browse files
HDS-4532 Remove isInline argument
1 parent c70772f commit cd81ad3

File tree

4 files changed

+10
-52
lines changed

4 files changed

+10
-52
lines changed

packages/components/src/components/hds/layout/grid/index.ts

-6
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ export interface HdsLayoutGridSignature {
2727
columnMinWidth?: string;
2828
align?: HdsLayoutGridAligns;
2929
gap?: HdsLayoutGridGaps | [HdsLayoutGridGaps, HdsLayoutGridGaps];
30-
isInline?: boolean;
3130
};
3231
Blocks: {
3332
default: [
@@ -113,11 +112,6 @@ export default class HdsLayoutGrid extends Component<HdsLayoutGridSignature> {
113112
}
114113
}
115114

116-
// add a class based on the @isInline argument
117-
if (this.args.isInline) {
118-
classes.push('hds-layout-grid--is-inline');
119-
}
120-
121115
return classes.join(' ');
122116
}
123117
}

packages/components/src/styles/components/layout/grid.scss

-8
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,6 @@
3232
var(--hds-layout-grid-column-gap, 0);
3333
}
3434

35-
// inline
36-
37-
.hds-layout-grid--is-inline {
38-
display: inline-grid;
39-
// prevents issue where grid columns don't line up in a row
40-
max-width: 100%;
41-
}
42-
4335
// align
4436

4537
.hds-layout-grid--align-items-start { align-items: start; }

showcase/app/templates/layouts/grid.hbs

+6-30
Original file line numberDiff line numberDiff line change
@@ -122,36 +122,6 @@
122122
{{/each}}
123123
{{/let}}
124124
</Shw::Grid>
125-
126-
<Shw::Divider @level={{2}} />
127-
128-
<Shw::Text::H2>Display</Shw::Text::H2>
129-
130-
<Shw::Grid @gap="2rem" @columns={{2}} class="shw-layout-grid-example-tint-flex-items" as |SF|>
131-
{{#let (array false true) as |booleans|}}
132-
{{#each booleans as |isInline|}}
133-
<SF.Item @label={{if isInline "inline-grid (isInline=true)" "grid (default)"}}>
134-
<Hds::Text::Body @size="200" @tag="div">
135-
Lorem
136-
<Hds::Layout::Grid @isInline={{isInline}} @columnMinWidth="2em">
137-
<Shw::Placeholder @text="#1" @height="24" />
138-
<Shw::Placeholder @text="#2" @height="24" />
139-
<Shw::Placeholder @text="#3" @height="24" />
140-
<Shw::Placeholder @text="#4" @height="24" />
141-
</Hds::Layout::Grid>
142-
sit amet
143-
<Hds::Layout::Grid @isInline={{isInline}} @columnMinWidth="2em">
144-
<Shw::Placeholder @text="#A" @height="24" />
145-
<Shw::Placeholder @text="#B" @height="24" />
146-
<Shw::Placeholder @text="#C" @height="24" />
147-
<Shw::Placeholder @text="#D" @height="24" />
148-
</Hds::Layout::Grid>
149-
elit.
150-
</Hds::Text::Body>
151-
</SF.Item>
152-
{{/each}}
153-
{{/let}}
154-
</Shw::Grid>
155125
</section>
156126

157127
<Shw::Divider />
@@ -179,6 +149,8 @@
179149
</SG.Item>
180150
</Shw::Grid>
181151

152+
<Shw::Divider @level="2" />
153+
182154
<Shw::Text::H3>colspan</Shw::Text::H3>
183155

184156
<Shw::Grid @columns="1" @gap="1.5rem" as |SG|>
@@ -240,6 +212,8 @@
240212
</SG.Item>
241213
</Shw::Grid>
242214

215+
<Shw::Divider @level="2" />
216+
243217
<Shw::Text::H3>rowspan</Shw::Text::H3>
244218

245219
<Shw::Grid @columns="1" @gap="1.5rem" as |SG|>
@@ -282,6 +256,8 @@
282256
</SG.Item>
283257
</Shw::Grid>
284258

259+
<Shw::Divider @level="2" />
260+
285261
<Shw::Text::H3>colspan & rowspan</Shw::Text::H3>
286262

287263
<Shw::Grid @columns="1" @gap="1.5rem" as |SG|>

showcase/tests/integration/components/hds/layout/grid/index-test.js

+4-8
Original file line numberDiff line numberDiff line change
@@ -71,26 +71,22 @@ module('Integration | Component | hds/layout/grid/index', function (hooks) {
7171
assert.dom('#test-layout-grid').hasTagName('section');
7272
});
7373

74-
// ALIGN / IS-INLINE
74+
// ALIGN
7575

76-
test('it should render the element without specific classes if no @align/@isInline are declared', async function (assert) {
76+
test('it should render the element without specific classes if @align is not declared', async function (assert) {
7777
await render(hbs`<Hds::Layout::Grid id="test-layout-grid" />`);
7878
assert
7979
.dom('#test-layout-grid')
8080
.doesNotHaveClass(/hds-layout-grid--align-items-/);
81-
assert
82-
.dom('#test-layout-grid')
83-
.doesNotHaveClass('.hds-layout-grid--is-inline');
8481
});
8582

86-
test('it should render the correct CSS classes if the @align/@isInline props are declared', async function (assert) {
83+
test('it should render the correct CSS classes if @align props are declared', async function (assert) {
8784
await render(
88-
hbs`<Hds::Layout::Grid id="test-layout-grid" @align="stretch" @wrap={{true}} @isInline={{true}} />`
85+
hbs`<Hds::Layout::Grid id="test-layout-grid" @align="stretch" @wrap={{true}} />`
8986
);
9087
assert
9188
.dom('#test-layout-grid')
9289
.hasClass('hds-layout-grid--align-items-stretch');
93-
assert.dom('#test-layout-grid').hasClass('hds-layout-grid--is-inline');
9490
});
9591

9692
// GAP

0 commit comments

Comments
 (0)