Setitngs: button to reset Android SDK path to default
Summary: Added button to reset Android SDK path to default + fixed default SDK path on Windows which I introduced in a previous diff and which before might be wrongly resolved to roaming data instead of local data folder Reviewed By: jknoxville Differential Revision: D19498899 fbshipit-source-id: e10865b528f55ea6b56873bdf9369c4b60dca89f
This commit is contained in:
committed by
Facebook Github Bot
parent
4f63d6435f
commit
7c03366136
@@ -51,6 +51,7 @@ const GreyedOutOverlay = styled.div({
|
||||
|
||||
export function FilePathConfigField(props: {
|
||||
label: string;
|
||||
resetValue?: string;
|
||||
defaultValue: string;
|
||||
onChange: (path: string) => void;
|
||||
frozen?: boolean;
|
||||
@@ -103,6 +104,16 @@ export function FilePathConfigField(props: {
|
||||
}>
|
||||
<CenteredGlyph name="dots-3-circle" variant="outline" />
|
||||
</FlexColumn>
|
||||
{props.resetValue && (
|
||||
<FlexColumn
|
||||
title={`Reset to default path ${props.resetValue}`}
|
||||
onClick={() => {
|
||||
setValue(props.resetValue!);
|
||||
props.onChange(props.resetValue!);
|
||||
}}>
|
||||
<CenteredGlyph name="undo" variant="outline" />
|
||||
</FlexColumn>
|
||||
)}
|
||||
{isValid ? null : (
|
||||
<CenteredGlyph name="caution-triangle" color={colors.yellow} />
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user