* feat: Add Listed pane in preferences * feat: Add list of blogs in Listed preferences feat: Allow custom classnames in LinkButton feat: Add mt-0 class * fix: Don't show non-Listed Action Extensions * fix: Use streamItems() * fix: Re-render UI when item is deleted * feat: Remove hardcoded margin-top for LinkButton * fix: Fix ESLint exhaustive-deps error * fix: Use useCallback hook feat: Disconnect shows state "Disconnecting..." when deleting item * fix: Remove unused imports * fix: Simplify disconnect function fix: Use key in the correct place * feat: Add confirmation dialog when deleting a blog feat: Show Blog/Blogs in the title depending on the number of items * style: Revert file to original formatting * refactor: Use preact instead of react refactor: Use FunctionalComponent type * feat: Show alert when disconnecting errors out fix: Set state to false even if errors refactor: Use ternary operator for Getting Started section * feat: Load Listed blog actions asynchronously * feat: Only fetch actions if not already available * refactor: Use async/await for disconnecting Co-authored-by: Mo Bitar <mo@standardnotes.org>
29 lines
927 B
TypeScript
29 lines
927 B
TypeScript
import { FunctionComponent } from 'preact';
|
|
|
|
export const Title: FunctionComponent = ({ children }) => (
|
|
<h2 className="text-base m-0 mb-1">{children}</h2>
|
|
);
|
|
|
|
export const Subtitle: FunctionComponent<{ className?: string }> = ({ children, className = "" }) => (
|
|
<h4 className={`font-medium text-sm m-0 mb-1 ${className}`}>{children}</h4>
|
|
);
|
|
|
|
export const Text: FunctionComponent<{ className?: string }> = ({
|
|
children,
|
|
className = '',
|
|
}) => <p className={`${className} text-xs`}>{children}</p>;
|
|
|
|
const buttonClasses = `block bg-default color-text rounded border-solid \
|
|
border-1 border-gray-300 px-4 py-1.75 font-bold text-sm fit-content \
|
|
focus:bg-contrast hover:bg-contrast `;
|
|
|
|
export const LinkButton: FunctionComponent<{
|
|
label: string;
|
|
link: string;
|
|
className?: string;
|
|
}> = ({ label, link, className }) => (
|
|
<a target="_blank" className={`${className} ${buttonClasses}`} href={link}>
|
|
{label}
|
|
</a>
|
|
);
|