Giter Site home page Giter Site logo

theshukran-react-utils's People

Contributors

andrea-zucca avatar charleyzhu avatar dependabot[bot] avatar zucska avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

theshukran-react-utils's Issues

One most important feature is this

Other like extracting to component is useless because of impossibility to change template and file extensions. Personally im working with typescript and react-native and by creating index.js with package.json file is not resolvable by typescript.

exports.extractStyle = () => editorContext((editor, selection, text, selectedText) => {
return vscode.window.showInputBox({ prompt: 'Insert name' }).then(input => {
if (!input) return;
editor.edit(edit => {
let row = editor.document.lineCount + 1, stylesText;
if (!!~text.indexOf('StyleSheet.create')) {
row = lineColumn(text).fromIndex(text.indexOf('StyleSheet.create')).line;
stylesText = `${input}: ${selectedText},\n`;
}
else {
stylesText = `\n\nconst styles = StyleSheet.create({\n${input}: ${selectedText},\n})`;
}
edit.replace(selection, `styles.${input}`);
edit.insert(new Position(row, 0), stylesText);
}).then(() => {
return vscode.commands.executeCommand('editor.action.formatDocument');
});
});
});

Refactoring not working for React Native in Typescript

Hi first of all this is a great extension so thank you for that. I'm using this extension in a react native project but extract options is not in the right click menu.

I'm using VSCode Version: 1.38.1 and the file extension is .tsx

React native extract to stylesheet in another file

Thanks for this super awesome extension. I was looking for something to extract inline styles to a StyleSheet and this does it! However it puts it into the same file. Is it possible to get option to extract it to a file named styles.js?

Add ability to customize the end path of the component

When I hit Extract component to a new file it asks for the name of the component and automatically creates a file under the given path (default /src/components) a folder with the name of the component and a file named index.js inside of it.

My structure is different, I have a folder inside of screens for each feature and a common folder of presentational components, I would love to use this plugin with a way to fit my case.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.