chore: update help button style (#1656)

pull/1657/head^2
boojack 2 years ago committed by GitHub
parent 96021e518a
commit 921d4b996d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -43,11 +43,11 @@ const SSOSection = () => {
return ( return (
<div className="section-container"> <div className="section-container">
<div className="mb-2 w-full flex flex-row justify-start items-center"> <div className="mb-2 w-full flex flex-row justify-start items-center gap-1">
<span className="font-mono text-sm text-gray-400 mr-2">{t("setting.sso-section.sso-list")}</span> <span className="font-mono text-sm text-gray-400">{t("setting.sso-section.sso-list")}</span>
<HelpButton icon="help" url="https://usememos.com/docs/keycloak" /> <HelpButton icon="help" url="https://usememos.com/docs/keycloak" />
<button <button
className="btn-normal px-2 py-0 leading-7" className="btn-normal px-2 py-0 ml-1"
onClick={() => showCreateIdentityProviderDialog(undefined, fetchIdentityProviderList)} onClick={() => showCreateIdentityProviderDialog(undefined, fetchIdentityProviderList)}
> >
{t("common.create")} {t("common.create")}

@ -76,10 +76,10 @@ const StorageSection = () => {
))} ))}
</Select> </Select>
<Divider /> <Divider />
<div className="mt-4 mb-2 w-full flex flex-row justify-start items-center"> <div className="mt-4 mb-2 w-full flex flex-row justify-start items-center gap-1">
<span className="font-mono text-sm text-gray-400 mr-2">{t("setting.storage-section.storage-services-list")}</span> <span className="font-mono text-sm text-gray-400">{t("setting.storage-section.storage-services-list")}</span>
<HelpButton className="btn" icon="info" url="https://usememos.com/docs/storage" /> <HelpButton className="btn" icon="info" url="https://usememos.com/docs/storage" />
<button className="btn-normal px-2 py-0 leading-7" onClick={() => showCreateStorageServiceDialog(undefined, fetchStorageList)}> <button className="btn-normal px-2 py-0 ml-1" onClick={() => showCreateStorageServiceDialog(undefined, fetchStorageList)}>
{t("common.create")} {t("common.create")}
</button> </button>
</div> </div>

@ -231,9 +231,9 @@ const SystemSection = () => {
<Switch checked={state.disablePublicMemos} onChange={(event) => handleDisablePublicMemosChanged(event.target.checked)} /> <Switch checked={state.disablePublicMemos} onChange={(event) => handleDisablePublicMemosChanged(event.target.checked)} />
</div> </div>
<div className="form-label"> <div className="form-label">
<div className="flex flex-row"> <div className="flex flex-row items-center">
<span className="normal-text">{t("setting.system-section.max-upload-size")}</span> <span className="normal-text mr-1">{t("setting.system-section.max-upload-size")}</span>
<HelpButton icon="info" hint={t("setting.system-section.max-upload-size-hint")} hintPlacement="left" /> <HelpButton icon="info" hint={t("setting.system-section.max-upload-size-hint")} />
</div> </div>
<Input <Input
className="w-16" className="w-16"
@ -247,8 +247,8 @@ const SystemSection = () => {
</div> </div>
<Divider className="!mt-3 !my-4" /> <Divider className="!mt-3 !my-4" />
<div className="form-label"> <div className="form-label">
<div className="flex flex-row"> <div className="flex flex-row items-center">
<span className="normal-text">{t("setting.system-section.openai-api-key")}</span> <span className="normal-text mr-1">{t("setting.system-section.openai-api-key")}</span>
<HelpButton hint={t("setting.system-section.openai-api-key-description")} url="https://platform.openai.com/account/api-keys" /> <HelpButton hint={t("setting.system-section.openai-api-key-description")} url="https://platform.openai.com/account/api-keys" />
</div> </div>
<Button onClick={handleSaveOpenAIConfig}>{t("common.save")}</Button> <Button onClick={handleSaveOpenAIConfig}>{t("common.save")}</Button>

@ -174,7 +174,7 @@ const HelpButton = (props: HelpProps): JSX.Element => {
const { t } = useTranslation(); const { t } = useTranslation();
const color = props.color ?? "neutral"; const color = props.color ?? "neutral";
const variant = props.variant ?? "plain"; const variant = props.variant ?? "plain";
const className = props.className ?? "!-mt-1"; const className = props.className ?? "";
const hintPlacement = props.hintPlacement ?? "top"; const hintPlacement = props.hintPlacement ?? "top";
const iconButtonSize = "sm"; const iconButtonSize = "sm";
@ -232,12 +232,12 @@ const HelpButton = (props: HelpProps): JSX.Element => {
const sizePx = (() => { const sizePx = (() => {
switch (props.size) { switch (props.size) {
case "sm": case "sm":
return 16; return 14;
case "lg": case "lg":
return 48; return 18;
case "md": case "md":
default: default:
return 24; return 16;
} }
})(); })();

Loading…
Cancel
Save