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

chore: small demo styling enhancements #1579

Merged
merged 1 commit into from
Jun 18, 2024
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/example03.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,10 @@ export default class Example03 {
}
},
{
id: 'action', name: 'Action', field: 'action', width: 100, maxWidth: 100,
id: 'action', name: 'Action', field: 'action', width: 90, maxWidth: 90,
excludeFromExport: true,
formatter: () => {
return `<div class="fake-hyperlink text-color-primary">Action <span class="font-12px">&#9660;</span></div>`;
return `<div class="fake-hyperlink text-color-primary flex justify-center">Action <i class="mdi mdi-chevron-down"></i></div>`;
},
cellMenu: {
hideCloseButton: false,
Expand Down
19 changes: 19 additions & 0 deletions examples/vite-demo-vanilla-bundle/src/examples/example04.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
// @import '@slickgrid-universal/common/dist/styles/sass/slickgrid-theme-material.scss';
.orange {
color: orange;
}

.cell-menu-dropdown {
border: 1px solid #a3a3a3;
border-radius: 5px;
display: flex;
align-items: center;
height: 90%;
width: max-content;
padding: 0 12px;
cursor: pointer;
&:hover {
background-color: #a3a3a3;
color: #ffffff;
}

.mdi-chevron-down {
margin-left: 5px;
}
}
4 changes: 1 addition & 3 deletions examples/vite-demo-vanilla-bundle/src/examples/example04.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,7 @@ export default class Example04 {
{
id: 'action', name: 'Action', field: 'action', width: 100, maxWidth: 100,
excludeFromExport: true,
formatter: () => {
return `<div class="fake-hyperlink">Action <span class="font-12px">&#9660;</span></div>`;
},
formatter: () => `<div class="cell-menu-dropdown">Action<i class="mdi mdi-chevron-down"></i></div>`,
cellMenu: {
hideCloseButton: false,
// you can override the logic of when the menu is usable
Expand Down
8 changes: 4 additions & 4 deletions examples/vite-demo-vanilla-bundle/src/examples/example18.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h6 class="title is-6 italic">
<div>
<div class="range">
<label for="refreshRateRange" class="form-label">Changes Rate(ms)</label>
<input type="range" class="form-range" id="refreshRateRange" min="0" max="250" value.bind="refreshRate">
<input type="range" class="form-range" id="refreshRateRange" min="0" max="250" step="5" value.bind="refreshRate">
<span class="refresh-rate">
<input type="number" class="is-narrow input is-small" value.bind="refreshRate">
</span>
Expand All @@ -44,13 +44,13 @@ <h6 class="title is-6 italic">
</span>
<span>
<label for="change-per-cycle-input">Changes p/Cycle</label>
<input type="number" class="is-narrow input is-small" id="change-per-cycle-input" value.bind="minChangePerCycle" max.bind="maxChangePerCycle">
<input type="number" class="is-narrow input is-small" id="change-per-cycle-input" value.bind="minChangePerCycle" max.bind="maxChangePerCycle" step="5">
to
<input type="number" class="is-narrow input is-small" value.bind="maxChangePerCycle" min.bind="minChangePerCycle">
<input type="number" class="is-narrow input is-small" value.bind="maxChangePerCycle" min.bind="minChangePerCycle" step="5">
</span>
<span>
<label for="highlight-input">Highlight Duration(ms)</label>
<input type="number" class="is-narrow input is-small" id="highlight-input" data-test="highlight-input" value.bind="highlightDuration">
<input type="number" class="is-narrow input is-small" id="highlight-input" data-test="highlight-input" value.bind="highlightDuration" step="10">
</span>
<span class="float-right">
<button class="button is-small" onclick.delegate="toggleFullScreen()">
Expand Down
6 changes: 3 additions & 3 deletions examples/vite-demo-vanilla-bundle/src/examples/example20.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ export default class Example20 {

// not sure why but ShadowDOM seems a little slower to render,
// let's wrap the grid resize in a delay & show the grid only after the resize
setTimeout(() => {
setTimeout(async () => {
this.sgb = new Slicker.GridBundle(shadowObj.gridContainer as HTMLDivElement, this.columnDefinitions, { ...ExampleGridOptions, ...this.gridOptions }, this.dataset);
this.sgb.resizerService.resizeGrid(150);
await this.sgb.resizerService.resizeGrid(150);
shadowObj.gridContainer.style.opacity = '1';
}, 50);
}, 75);
}

/**
Expand Down
Loading