forked from jitsucom/jitsu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unify entities titles and icons drawing across all components Provisioning DB name - clear unsupported symbols from slug Remove object name min characters requirement
- Loading branch information
Showing
20 changed files
with
351 additions
and
211 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from "react"; | ||
|
||
export const ObjectTitle: React.FC<{ | ||
size?: "small" | "default" | "large"; | ||
icon?: React.ReactNode; | ||
title: string | React.ReactNode; | ||
}> = ({ icon, title, size = "default" }) => { | ||
const iconClassName = (() => { | ||
switch (size) { | ||
case "small": | ||
return "h-4 w-4"; | ||
case "large": | ||
return "h-10 w-10"; | ||
default: | ||
return "h-6 w-6"; | ||
} | ||
})(); | ||
return ( | ||
<div className={`flex items-center ${size !== "small" ? "gap-3" : "gap-2"}`}> | ||
{icon && <div className={iconClassName}>{icon}</div>} | ||
<div className={`text-text ${size !== "small" ? "font-semibold" : ""}`}>{title}</div> | ||
</div> | ||
); | ||
}; |
Oops, something went wrong.