Deprecate more standard components
Summary: Additional deprecation warnings for components that should be imported from flipper-plugin Reviewed By: nikoant Differential Revision: D28027382 fbshipit-source-id: e46a40a950adb615d206bc08334893263c56dd1f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d8ecab6995
commit
9a6e84fedd
@@ -14,6 +14,7 @@ import {colors} from './colors';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Displays all children in a bordered, zebra styled vertical layout
|
* Displays all children in a bordered, zebra styled vertical layout
|
||||||
|
* @deprecated use Layout.Container gap
|
||||||
*/
|
*/
|
||||||
const AlternatingRows: React.FC<{
|
const AlternatingRows: React.FC<{
|
||||||
children: React.ReactNode[] | React.ReactNode;
|
children: React.ReactNode[] | React.ReactNode;
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import styled from '@emotion/styled';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A Block styled div
|
* A Block styled div
|
||||||
|
* @deprecated use Layout.Container
|
||||||
*/
|
*/
|
||||||
const Block = styled.div({
|
const Block = styled.div({
|
||||||
display: 'block',
|
display: 'block',
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import {colors} from './colors';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Puts a gray border around something
|
* Puts a gray border around something
|
||||||
|
* @deprecated use Layout.Container
|
||||||
*/
|
*/
|
||||||
const Bordered = styled.div({
|
const Bordered = styled.div({
|
||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
|
|||||||
@@ -10,6 +10,9 @@
|
|||||||
import FlexBox from './FlexBox';
|
import FlexBox from './FlexBox';
|
||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated use Layout.Container
|
||||||
|
*/
|
||||||
const Box = styled(FlexBox)({
|
const Box = styled(FlexBox)({
|
||||||
height: '100%',
|
height: '100%',
|
||||||
overflow: 'auto',
|
overflow: 'auto',
|
||||||
|
|||||||
@@ -260,6 +260,7 @@ type Props = {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A simple button, used in many parts of the application.
|
* A simple button, used in many parts of the application.
|
||||||
|
* @deprecated use import {Button} from `antd` instead.
|
||||||
*/
|
*/
|
||||||
export default function Button(props: Props) {
|
export default function Button(props: Props) {
|
||||||
return <SandyButton {...props} />;
|
return <SandyButton {...props} />;
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ export const ButtonGroupContext = createContext(false);
|
|||||||
* <Button>Three</Button>
|
* <Button>Three</Button>
|
||||||
* </ButtonGroup>
|
* </ButtonGroup>
|
||||||
* ```
|
* ```
|
||||||
|
* @deprecated use Layout.Horizontal with flags: gap pad wrap
|
||||||
*/
|
*/
|
||||||
export default function ButtonGroup({children}: {children: React.ReactNode}) {
|
export default function ButtonGroup({children}: {children: React.ReactNode}) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ type Props = {
|
|||||||
* <Button>Three</Button>
|
* <Button>Three</Button>
|
||||||
* </ButtonGroupChain>
|
* </ButtonGroupChain>
|
||||||
* ```
|
* ```
|
||||||
|
*
|
||||||
|
* @deprecated use Layout.Horizontal with flags: gap pad wrap
|
||||||
*/
|
*/
|
||||||
export default function ButtonGroupChain({children, iconSize, icon}: Props) {
|
export default function ButtonGroupChain({children, iconSize, icon}: Props) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import React from 'react';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Button group to navigate back and forth.
|
* Button group to navigate back and forth.
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
export default function ButtonNavigationGroup(props: {
|
export default function ButtonNavigationGroup(props: {
|
||||||
/** Back button is enabled */
|
/** Back button is enabled */
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ ContentWrapper.displayName = 'CenteredView:ContentWrapper';
|
|||||||
/**
|
/**
|
||||||
* CenteredView creates a scrollable container with fixed with, centered content.
|
* CenteredView creates a scrollable container with fixed with, centered content.
|
||||||
* Recommended to combine with RoundedSection
|
* Recommended to combine with RoundedSection
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
const CenteredView: React.FC<{}> = ({children}) => (
|
const CenteredView: React.FC<{}> = ({children}) => (
|
||||||
<Container grow>
|
<Container grow>
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ CheckboxContainer.displayName = 'Checkbox:CheckboxContainer';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A checkbox to toggle UI state
|
* A checkbox to toggle UI state
|
||||||
|
* @deprecated use Checkbox from 'antd' instead
|
||||||
*/
|
*/
|
||||||
export default class Checkbox extends PureComponent<CheckboxProps> {
|
export default class Checkbox extends PureComponent<CheckboxProps> {
|
||||||
onChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
onChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
|
|||||||
@@ -9,6 +9,9 @@
|
|||||||
|
|
||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated, use <Typography.Paragraph><pre>.... instead.
|
||||||
|
*/
|
||||||
const CodeBlock = styled.div({
|
const CodeBlock = styled.div({
|
||||||
fontFamily: 'monospace',
|
fontFamily: 'monospace',
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ RadioboxContainer.displayName = 'Radiobox:RadioboxContainer';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A radio button to toggle UI state
|
* A radio button to toggle UI state
|
||||||
|
* @deprecated use Radio from 'antd'
|
||||||
*/
|
*/
|
||||||
export default class Radio extends PureComponent<RadioProps> {
|
export default class Radio extends PureComponent<RadioProps> {
|
||||||
onChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
onChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ import {Property} from 'csstype';
|
|||||||
|
|
||||||
type Props = {children: React.ReactNode; background?: Property.Background<any>};
|
type Props = {children: React.ReactNode; background?: Property.Background<any>};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated use Layout.ScrollContainer from 'flipper-plugin'
|
||||||
|
*/
|
||||||
const Scrollable = styled.div<Props>(({background}) => ({
|
const Scrollable = styled.div<Props>(({background}) => ({
|
||||||
width: '100%',
|
width: '100%',
|
||||||
height: '100%',
|
height: '100%',
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ export type Props = {
|
|||||||
width?: Property.Width<number>;
|
width?: Property.Width<number>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated use Tab from flipper-plugin
|
||||||
|
*/
|
||||||
export default function Tab(_props: Props): JSX.Element {
|
export default function Tab(_props: Props): JSX.Element {
|
||||||
throw new Error("don't render me");
|
throw new Error("don't render me");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ TabContent.displayName = 'Tabs:TabContent';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* A Tabs component.
|
* A Tabs component.
|
||||||
|
* @deprecated use Tabs from flipper-plugin
|
||||||
*/
|
*/
|
||||||
export default function Tabs(props: {
|
export default function Tabs(props: {
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -24,6 +24,9 @@ type TooltipProps = {
|
|||||||
options?: TooltipOptions;
|
options?: TooltipOptions;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated use Tooltip from 'tantd'
|
||||||
|
*/
|
||||||
export default function Tooltip(props: TooltipProps) {
|
export default function Tooltip(props: TooltipProps) {
|
||||||
const tooltipManager = useContext(TooltipContext);
|
const tooltipManager = useContext(TooltipContext);
|
||||||
const ref = useRef<HTMLDivElement | null>();
|
const ref = useRef<HTMLDivElement | null>();
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ import {theme} from 'flipper-plugin';
|
|||||||
|
|
||||||
// Last updated: Jan 30 2016
|
// Last updated: Jan 30 2016
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated use `theme` from 'flipper-plugin' instead, which exposes semantic colors that respect dark/light mode.
|
||||||
|
*/
|
||||||
export const colors = {
|
export const colors = {
|
||||||
// FIG UI Core
|
// FIG UI Core
|
||||||
blue: '#4267b2', // Blue - Active-state nav glyphs, nav bars, links, buttons
|
blue: '#4267b2', // Blue - Active-state nav glyphs, nav bars, links, buttons
|
||||||
|
|||||||
Reference in New Issue
Block a user