Skip to content
This repository has been archived by the owner on Dec 20, 2024. It is now read-only.

Chore: Deprecate components available in @grafana/ui #115

Merged
merged 3 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/ConfigEditor/Auth/common/SecretInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export type Props = React.ComponentProps<typeof Input> & {
export const CONFIGURED_TEXT = 'configured';
export const RESET_BUTTON_TEXT = 'Reset';

/**
* @deprecated use the component from @grafana/ui instead. Available starting from @grafana/[email protected]
*/
export const SecretInput = ({ isConfigured, onReset, ...props }: Props) => (
<HorizontalGroup>
{!isConfigured && <Input {...props} type="password" />}
Expand Down
1 change: 1 addition & 0 deletions src/ConfigEditor/Auth/common/SecretTextarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const getStyles = (theme: GrafanaTheme2) => {
/**
* Text area that does not disclose an already configured value but lets the user reset the current value and enter a new one.
* Typically useful for asymmetric cryptography keys.
* @deprecated use the component from @grafana/ui instead. Available starting from @grafana/[email protected]
*/
export const SecretTextArea = ({ isConfigured, onReset, ...props }: Props) => {
const styles = useStyles2(getStyles);
Expand Down
3 changes: 3 additions & 0 deletions src/QueryEditor/Space.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export interface SpaceProps {
layout?: 'block' | 'inline';
}

/**
* @deprecated use the Space component from @grafana/ui instead. Available starting from @grafana/[email protected]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10.4 is not released yet, but I've added this here to show that an alternative is available.

*/
export const Space = (props: SpaceProps) => {
const styles = useStyles2(useCallback((theme) => getStyles(theme, props), [props]));

Expand Down
3 changes: 3 additions & 0 deletions src/QueryEditor/Stack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ interface StackProps {
flexGrow?: CSSProperties['flexGrow'];
}

/**
* @deprecated use the Stack component from @grafana/ui instead. Available starting from @grafana/[email protected]
*/
export const Stack = ({ children, ...props }: React.PropsWithChildren<StackProps>) => {
const styles = useStyles2(useCallback((theme) => getStyles(theme, props), [props]));

Expand Down
Loading