Skip to content

Commit 15f980f

Browse files
committed
chore: updated styles and sample data
1 parent 0c1bd39 commit 15f980f

File tree

6 files changed

+44
-33
lines changed

6 files changed

+44
-33
lines changed

example/src/main.ts

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -362,20 +362,8 @@ export const createMynahUI = (initialData?: MynahUIDataModel): MynahUI => {
362362
{
363363
id: generateUID(),
364364
icon: MynahIcons.CHECK_LIST,
365-
description: `
366-
\`some very long markdown string goes
367-
\n
368-
here to see if it gets cut off properly as expected, with an ellipsis through css.some very long markdown
369-
\n
370-
string goes here to see if it gets cut off properly as expected, with an ellipsis through css.some very
371-
372-
long markdown string goes here to see if it gets cut off properly as expected, with an ellipsis through css.some v
373-
374-
ery long markdown string goes here to see if it gets cut off properly as expected, with an ellipsis through css.som
375-
376-
e very long markdown string goes here to see if it gets cut off properly as expected, with an ellipsis through css.some
377-
378-
very long markdown string goes here to see if it gets cut off properly as expected, with an ellipsis through css.\``,
365+
description: `some very long markdown string goes
366+
here to see if it gets cut off properly as expected, with an ellipsis through css.some very long markdown string goes here to see if it gets cut off properly as expected, with an ellipsis through css.some very long markdown string goes here to see if it gets cut off properly as expected, with an ellipsis through css. some very long markdown string goes here to see if it gets cut off properly as expected, with an ellipsis through css. some very long markdown string goes here to see if it gets cut off properly as expected, with an ellipsis through css. some very long markdown string goes here to see if it gets cut off properly as expected, with an ellipsis through css.`,
379367
actions: [
380368
{
381369
id: generateUID(),
@@ -664,7 +652,7 @@ export const createMynahUI = (initialData?: MynahUIDataModel): MynahUI => {
664652
groupName: 'Today',
665653
children: [
666654
{
667-
title: 'Always add comments to my lines of Rust',
655+
title: 'Always add comments to my lines of Rust',
668656
description: 'Created by *user* at **2:45pm** on 1/2/24',
669657
actions: [
670658
{
@@ -680,7 +668,7 @@ export const createMynahUI = (initialData?: MynahUIDataModel): MynahUI => {
680668
],
681669
},
682670
{
683-
title: 'Always add comments to my lines of Rust',
671+
title: 'Always add comments to my lines of Rust',
684672
description: 'Created by user at **2:45pm** on 1/2/24',
685673
actions: [
686674
{
@@ -701,7 +689,7 @@ export const createMynahUI = (initialData?: MynahUIDataModel): MynahUI => {
701689
groupName: 'Yesterday',
702690
children: [
703691
{
704-
title: 'Another memory',
692+
title: 'Another memory',
705693
description: 'Inferred by Q at 2:45pm on 1/2/24',
706694
actions: [
707695
{
@@ -717,7 +705,7 @@ export const createMynahUI = (initialData?: MynahUIDataModel): MynahUI => {
717705
],
718706
},
719707
{
720-
title: 'Another memory',
708+
title: 'Another memory',
721709
description: 'Inferred by Q at 2:45pm on 1/2/24',
722710
actions: [
723711
{
@@ -733,7 +721,7 @@ export const createMynahUI = (initialData?: MynahUIDataModel): MynahUI => {
733721
],
734722
},
735723
{
736-
title: 'Another memory',
724+
title: 'Another memory',
737725
description: 'Inferred by Q at 2:45pm on 1/2/24',
738726
actions: [
739727
{
@@ -749,7 +737,7 @@ export const createMynahUI = (initialData?: MynahUIDataModel): MynahUI => {
749737
],
750738
},
751739
{
752-
title: 'Another memory',
740+
title: 'Another memory',
753741
description: 'Inferred by Q at 2:45pm on 1/2/24',
754742
actions: [
755743
{
@@ -770,7 +758,7 @@ export const createMynahUI = (initialData?: MynahUIDataModel): MynahUI => {
770758
groupName: '4 days ago',
771759
children: [
772760
{
773-
title: 'Another memory',
761+
title: 'Another memory',
774762
description: 'Inferred by Q at 2:45pm on 1/2/24',
775763
actions: [
776764
{
@@ -786,7 +774,7 @@ export const createMynahUI = (initialData?: MynahUIDataModel): MynahUI => {
786774
],
787775
},
788776
{
789-
title: 'Another memory',
777+
title: 'Another memory',
790778
description: 'Inferred by Q at 2:45pm on 1/2/24',
791779
actions: [
792780
{
@@ -807,7 +795,7 @@ export const createMynahUI = (initialData?: MynahUIDataModel): MynahUI => {
807795
groupName: 'Last week',
808796
children: [
809797
{
810-
title: 'Another memory',
798+
title: 'Another memory',
811799
description: 'Inferred by Q at 2:45pm on 1/2/24',
812800
actions: [
813801
{
@@ -823,7 +811,7 @@ export const createMynahUI = (initialData?: MynahUIDataModel): MynahUI => {
823811
],
824812
},
825813
{
826-
title: 'Another memory',
814+
title: 'Another memory',
827815
description: 'Inferred by Q at 2:45pm on 1/2/24',
828816
actions: [
829817
{
@@ -839,7 +827,7 @@ export const createMynahUI = (initialData?: MynahUIDataModel): MynahUI => {
839827
],
840828
},
841829
{
842-
title: 'Another memory',
830+
title: 'Another memory',
843831
description: 'Inferred by Q at 2:45pm on 1/2/24',
844832
actions: [
845833
{
@@ -855,7 +843,7 @@ export const createMynahUI = (initialData?: MynahUIDataModel): MynahUI => {
855843
],
856844
},
857845
{
858-
title: 'Another memory',
846+
title: 'Another memory',
859847
description: 'Inferred by Q at 2:45pm on 1/2/24',
860848
actions: [
861849
{
@@ -871,7 +859,7 @@ export const createMynahUI = (initialData?: MynahUIDataModel): MynahUI => {
871859
],
872860
},
873861
{
874-
title: 'Another memory',
862+
title: 'Another memory',
875863
description: 'Inferred by Q at 2:45pm on 1/2/24',
876864
actions: [
877865
{

example/src/samples/sample-data.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1854,9 +1854,9 @@ export const sampleMCPList: DetailedList = {
18541854
groupActions: false,
18551855
actions: [
18561856
{
1857-
id: 'edit-mcp-git',
1857+
id: 'open-mcp-xx',
18581858
text: 'Fix configuration',
1859-
status: 'info',
1859+
status: 'warning',
18601860
fillState: 'hover'
18611861
},
18621862
{

src/components/detailed-list/detailed-list-item.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ export class DetailedListItemWrapper {
150150
...(showText === true ? { label: action.text } : {}),
151151
tooltip: action.description,
152152
primary: false,
153+
border: false,
153154
status: action.status,
154155
onClick: (e) => {
155156
cancelEvent(e);

src/styles/components/_button.scss

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
@import '../scss-variables';
22
.mynah-button {
3-
border: none;
3+
&:not(.mynah-button-border) {
4+
border: none;
5+
}
46
min-width: var(--mynah-sizing-7);
57
min-height: var(--mynah-sizing-7);
68
border-radius: var(--mynah-button-radius);
@@ -73,7 +75,9 @@
7375
&::after {
7476
color: var(--mynah-color-status-#{$status});
7577
}
76-
border: var(--mynah-border-width) solid var(--mynah-color-status-#{$status}) !important;
78+
.mynah-button-border {
79+
border: var(--mynah-border-width) solid var(--mynah-color-status-#{$status}) !important;
80+
}
7781
}
7882
}
7983
}

src/styles/components/_detailed-list.scss

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,11 @@
231231

232232
> .mynah-detailed-list-item-actions {
233233
flex-shrink: 0;
234+
display: flex;
235+
flex-flow: row nowrap;
236+
align-items: center;
237+
justify-content: flex-end;
238+
gap: var(--mynah-sizing-half);
234239
}
235240

236241
> .mynah-detailed-list-item-arrow-icon {
@@ -295,3 +300,15 @@
295300
}
296301
}
297302
}
303+
304+
.mynah-sheet
305+
> .mynah-sheet-body
306+
> .mynah-detailed-list
307+
> .mynah-detailed-list-item-groups-wrapper
308+
> .mynah-detailed-list-group {
309+
> .mynah-detailed-list-group-title,
310+
> .mynah-detailed-list-items-block > .mynah-detailed-list-item[selectable="false"] {
311+
padding-left: 0;
312+
padding-right: 0;
313+
}
314+
}

src/styles/components/_sheet.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
transform: translate3d(0, 0, 0);
7070
display: flex;
7171
flex-flow: column;
72-
gap: var(--mynah-sizing-4);
72+
gap: var(--mynah-sizing-3);
7373
align-items: stretch;
7474
transform-origin: right bottom;
7575
z-index: var(--mynah-z-1);
@@ -78,9 +78,10 @@
7878
border-top-right-radius: var(--mynah-card-radius);
7979
border-top-left-radius: var(--mynah-card-radius);
8080
border-bottom: none;
81+
// TODO: Move to css-custom-properties
8182
box-shadow: 0px -25px 20px -25px rgba(0, 0, 0, 0.15);
8283
background-color: var(--mynah-color-bg);
83-
padding: var(--mynah-sizing-4);
84+
padding: var(--mynah-sizing-3);
8485
min-height: 20vh;
8586

8687
&.mynah-sheet-fullscreen {

0 commit comments

Comments
 (0)