Merge pull request #139 from huyjs9/feat/table-info-color

Add color for table info
This commit is contained in:
lilit 2024-06-19 04:31:36 +03:00 committed by GitHub
commit c43adae561
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 11 additions and 4 deletions

View File

@ -98,7 +98,7 @@ export default function NoteInfo({ data, nid }) {
<button <button
key={c} key={c}
style={{ backgroundColor: c }} style={{ backgroundColor: c }}
className="p-3 rounded-full mx-1" className="w-10 h-10 p-3 rounded-full mx-1"
onClick={() => { onClick={() => {
setUndoStack((prev) => [ setUndoStack((prev) => [
...prev, ...prev,

View File

@ -46,10 +46,17 @@ export default function TablesTab() {
{tables.map((t) => ( {tables.map((t) => (
<div id={`scroll_table_${t.id}`} key={t.id}> <div id={`scroll_table_${t.id}`} key={t.id}>
<Collapse.Panel <Collapse.Panel
className="relative"
header={ header={
<div className="overflow-hidden text-ellipsis whitespace-nowrap"> <>
{t.name} <div className="overflow-hidden text-ellipsis whitespace-nowrap">
</div> {t.name}
</div>
<div
className="w-1 h-full absolute top-0 left-0 bottom-0"
style={{ backgroundColor: t.color }}
/>
</>
} }
itemKey={`${t.id}`} itemKey={`${t.id}`}
> >