Skip to content

Commit

Permalink
Tweaks/UI (#877)
Browse files Browse the repository at this point in the history
* fixed typo

* tweaked Badge appearance

* removed table border-radius, added dev script

* wrap table columns to cater to unusually long non-breaking words (if present)

* fixed version in dev script

* Cleanup for Themer

---------

Co-authored-by: Aswin V <[email protected]>
  • Loading branch information
deepakprabhakara and niwsa authored Feb 13, 2024
1 parent 7758d84 commit 5848b75
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 44 deletions.
12 changes: 12 additions & 0 deletions dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
VERSION=3.3.34
npm run cleanup:mitosis-out && npm run build

cd react
npm unpublish --registry http://localhost:4873/ @boxyhq/react-ui@$VERSION
npm publish --registry http://localhost:4873/

cd ../..
cd saas-app
npm uninstall @boxyhq/react-ui && npm i --save-exact --registry http://localhost:4873/ @boxyhq/react-ui@$VERSION
rm -rf .next
2 changes: 1 addition & 1 deletion src/dsync/DirectoriesWrapper/index.lite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function DirectoriesWrapper(props: DirectoriesWrapperProps) {
<Show when={state.view === 'LIST'}>
<div class={styles.listview}>
<div class={styles.header}>
<h5 class={styles.h5}>{props.title || 'Manage Dsync Connections'}</h5>
<h5 class={styles.h5}>{props.title || 'Manage DSync Connections'}</h5>
<div class={styles.ctoa}>
<Button
name='New Directory'
Expand Down
1 change: 0 additions & 1 deletion src/dsync/DirectoryList/index.module.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.tableContainer {
border-width: 1px;
border-radius: 4px;
}
3 changes: 1 addition & 2 deletions src/shared/Badge/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
display: inline-block;
padding: 0.25rem 0.56rem;
border-radius: 0.375rem;
color: var(--primary-color-950);
text-transform: uppercase;
color: white;
font-size: 0.75rem;
line-height: 0.75rem;
}
Expand Down
6 changes: 4 additions & 2 deletions src/shared/Table/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
color: rgb(55 65 81);
}

.td {
word-break: break-all;
}

.th,
.td {
padding: 0.75rem 1.5rem;
Expand Down Expand Up @@ -56,5 +60,3 @@ tbody .tr:hover {
display: inline-flex;
align-items: baseline;
}


34 changes: 0 additions & 34 deletions src/shared/Themer/defaultTheme.ts

This file was deleted.

6 changes: 3 additions & 3 deletions src/shared/Themer/index.lite.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { onUpdate } from '@builder.io/mitosis';
import { THEME } from './defaultTheme';
import type { Theme } from './types';

interface ThemerProps {
overrideTheme?: Partial<typeof THEME>;
overrideTheme?: Partial<Theme>;
children: any;
}

export default function Themer(props: ThemerProps) {
onUpdate(() => {
Object.entries({ ...THEME, ...props.overrideTheme }).forEach(([cssVar, value]) => {
Object.entries({ ...props.overrideTheme }).forEach(([cssVar, value]) => {
document.documentElement.style.setProperty(cssVar, value);
});
}, [props.overrideTheme]);
Expand Down
34 changes: 34 additions & 0 deletions src/shared/Themer/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
export type Theme = {
'--primary-color': string;
'--primary-foreground-color': string;
'--primary-hover': string;
'--primary-active': string;
'--primary-disabled': string;
'--primary-color-50': string;
'--primary-color-100': string;
'--primary-color-200': string;
'--primary-color-300': string;
'--primary-color-500': string;
'--primary-color-600': string;
'--primary-color-700': string;
'--primary-color-800': string;
'--primary-color-900': string;
'--primary-color-950': string;
'--secondary-color': string;
/* --secondary-color: "#27272a", dark mode */
'--primary-text-color': string;
/* --primary-text-color: #fafafa, dark mode */
'--primary-text-color-500': string;
'--ring-offset': string;
'--ring-offset-width': string;
'--ring-offset-color': string;
/* --ring-offset-color: hsl(240 10 3.9), dark mode*/
'--ring-color': string;
/* --ring-color: hsl(240 4.9% 83.9%), dark mode */
'--border-color': string;
'--border-width': string;
'--border-radius': string;
'--alert-color-success': string;
'--alert-color-info': string;
'--alert-color-warning': string;
};
1 change: 0 additions & 1 deletion src/sso/connections/ConnectionList/index.module.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.tableContainer {
border-width: 1px;
border-radius: 4px;
}

0 comments on commit 5848b75

Please sign in to comment.